Articles of plugin custom permalinks

Specifying multiple categories in URL (permalink)?

For example: where dell and studio are categories A few months back I heard from someone that it is not possible. I need to know why? Which part of code prevents it? Is there any workaround for this?

Rewrite url without flushing the database?

Is it possible to create a rewrite in WP dynamically such that no flushing is required? For example, not storing the rewrite in the database but rather defined in my plugin code?

How do I prefix blog post urls as but allow authors to still be located at

I’ve tried a bunch of things but cannot find a solution that works. I want my site to have the structure: = homepage = blog archive = blog archive (in a specific year) = blog archive (in a specific month) = blog post = authors archive = author […]

Why permalinks work with /index.php/%postname% but not with just %postname%?

I’m having a problem with WordPress permalinks. I change the permalinks to pretty permalinks but I am just getting 404s for the pages now. The strange thing is when I use /index.php/%postname% the page links work fine, but I need to get rid of the index.php part. I read about making changes to httpd.conf file […]

404 errors after plugin options update and category base change

I’m calling the function below after each “save changes” on my plugin’s settings file via the sanitization callback. The plugin allows the end user to change their category base, and needs to completely rewrite the permalinks in order to avoid 404 errors. However, I’m still getting 404s. The only way I can resolve them is […]

Add specific word to default page permalink

Right now I am working on one of my client’s project. Its all about amazon product display. My client wants me to change the permalinks of all posts, pages, serch results, archive pages, categorypages, all custom post type pages. I am very new to Rewrite API. I have read the documentation provide on wordpress codex […]

How to assign a Permalink to a Function

In Drupal, you can assign a URI to a function that gets called, like this: function mymodule_menu() { return array( ‘custom_uri’ => array( ‘page callback’ => ‘my_custom_function’, […] ); ); } This then tells Drupal to call the function my_custom_function whenever the url is In WordPress I’m trying to accomplish the same idea. I […]

Modify get_permalink with a specific filter

I’m trying to modify the get_permalink function to return a custom url, as: function my_function( $permalink, $postID ) { $external_link = get_post_meta( $postID, ‘external_link’, true ); if( !empty( $external_link ) ) { $permalink = $external_link; } return $permalink; } add_filter( ‘post_link’, ‘my_function’, 10, 2 ); So, when I will call the function as: <a href=”‘ […]

Handle category name URL rewrite before different post type slugs

I went over a hundred similar topics here which were close to what I need, but unfortunately I wasn’t able to fine tune this so apologies if it’s a duplicate. I have a several post types (such as Events, Venues, Places) and I also use Posts, where the four post types are connected to the […]

How to call a plugin function from index.php

I have created a function in my plugin myplugin with the name foo, how to call it from the frontend? e.g. index.php?