Include language variable in url

In your example Change this: public function custom_permastruct() { add_permastruct(‘language’, ‘%lang%’, false); } to this: public function custom_permastruct() { add_rewrite_tag(‘%lang%’,'(lang)s’,’post_type=”); add_permastruct(“language’, ‘%lang%’, false); } Please note that this will only work on WordPress 3.4+ Other ways of doing it: You need to create a new permalink and after to set some rewrite rules. The function … Read more

redirect word-press page with page values

Use this code and check<a href=”‘. get_permalink(‘dashboard’) .’?dashboard=myprofile” class=”wpum-profile-account-edit”>’. __(‘ (Edit Account)’, ‘wpum’) .'</a>. In get_permalink() function you can only pass the post ids or page titles to get the page url but you have added additional parameters with that so it was not getting the correct url. So I have edited the code to … Read more

How to remove slug from url (custom post type)

Whenever you register_post_type(), one of the args is rewrite where you can reset the URL to something else. Maybe you can play with this — try leaving it blank? Pro tip: You will have to reset permalinks after you do this.

Multiple Parent Category URLs

You shouldn’t need to do any of that. When you set up a category in the backend of a WordPress website, the archive is normally created/taken care of for you. So if you create a category called ‘Massive Dogs’ and you got to “/massive-dogs’ after you have created a post in that category (and the … Read more

WordPress pagination URL

This is not pagination, this is site structure. Similar structure can be achieved by the following: Pages and subpages (default functionality) Posts and categories or tags (default functionality) Hierarchical custom post types (using plugins or coding yourself) Custom post types and taxonomies (using plugins or coding yourself) Depending on a variety of causes, possibly, you’ll … Read more