• first off, sorry if this is answered somewhere, but trying to find things on this forum is like pulling teeth without Novocaine.

    I’m writing a plugin and want it to generate seo/sef friendly links if the person has this enabled (using the permalinks, not .htaccess since not all servers support htaccess)

    I know that it will change index.php?p=1 into like index.php/madlibs/

    but I want to add extra variables, so I need it to change something like
    index.php?p=1&puz=14 to index.php/madlibs/14/ or index.php/madlibs/<title of puzzle> (the latter of the 2 being preferable)

    thank you in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    You need to determine which functions are called by your template to generate permalinks. They will probably be defined on wp-includes/link-template.php. They all have filters which can be hooked where your code can add any parameters to the link you need.

    You will of course need code to handle the parameters included in these links when requested, but I suppose that’s a different question.

    Thread Starter luckdragon

    (@luckdragon)

    I already know how to handle the passed parameters, and already have the hooks in place for that, but I can’t find any information about hooks to create the links with the extra parameters, only how to use the extra parameters once they are created (like if I create them manually)

    Moderator bcworkz

    (@bcworkz)

    I not confident there is any information other than studying the above mentioned source code. It should be apparent how to proceed just from that. You may get by with discarding the passed links and fully substituting your own, just ensuring it’s returned in the correct format.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SEO/SEF’ is closed to new replies.