Support » Plugin: Permalink Manager Lite » Dynamic placeholder for same custom post

  • Resolved limbcode

    (@limbcode)


    Hello,

    I am using your plugin and it is pretty cool.
    I have following permalink structure for one of my custom post names “team”

    %country%/team/%team%

    I want to change it to the following structure %country%/team/%team%/%tab% in the way that the last %tab% placeholder could be 4 different type of values for single custom post.

    So I would have example.com/en/team/milan/squad, example.com/en/team/milan/results, etc … pointing to same page (with exactly same ID).

    Could you advise me how to do that with the help of your plugin and also please tell me what kind of Permastructure tags to use for tab placeholder.

    Thanks in advance.

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

    (@mbis)

    Hi @limbcode,

    I am afraid that it will not be possible to make it working with only my plugin. You will need to register additional rewrite endpoints (squad, results).

    Here you can find more information on how to add them:

    Rewrite endpoints API

    Best regards,
    Maciej

    Hi @mbis

    Thanks for replay.

    Yeah I thought about that kind of implementation. I am wondering does your plugin has proper hook ( or some part ) to include this kind of customization or it would be better to write something separately ?

    Plugin Author Maciej Bis

    (@mbis)

    Hi @limbcode,

    actually, the new endpoints should be recognized by my plugin. You can also add them to the list using this hook:

    function pm_extra_endpoints($endpoints) {
    	$endpoints .= "|squad|results";
    
    	return $endpoints;
    }
    add_filter('permalink-manager-endpoints', 'pm_extra_endpoints');

    Best regards,
    Maciej

    Hi @mbis,

    Thanks for clarification.

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