Support » Plugin: Permalink Manager Lite » Single Posts and CPTs with pagination

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @luano12,

    the /page/ endpoint works only for archive (including blog page). The pagination links for single items should look like this:

    http://rentalias.volcanicvalley.com/venta-nuda-propiedad-barcelona/piso-en-venta-calle-calabria/20
    http://rentalias.volcanicvalley.com/noticias/donde-invertir-2019/20

    I do not see anywhere the pagination naviagtion in the content, could you send me a sample link where it is present?

    Best regards,
    Maciej

    My bad english make I’mm be not clear, sorry about that. I don’t want this paginations in URL. In deed, I dont know why this happen, but when I disable the plugin, they don appear

    Plugin Author Maciej Bis

    (@mbis)

    Hi @luano12,

    ok, I see, so basically you would like to force 404 for non-existing pagination pages for single posts & CPT items.

    If so, you can enable “Force 404 on non-existing pagination pages” option conditionally using this code. With this code, the function will be triggered only for posts & CPT items (please disable the option in plugin settings).

    Please paste it to functions.php in (child) theme directory:

    function pm_disable_pagination() {
    	global $permalink_manager;
    
    	if(!empty($permalink_manager->functions) && (is_singular() || is_single())) {
    		add_action('wp', array($permalink_manager->functions['core-functions'], 'fix_pagination_pages'), 0);
    	}
    }
    add_action('init', 'pm_disable_pagination');

    Best regards,
    Maciej

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.