how to add prefix to post url structor only
You have to set with_front to false when you register your taxonomy or post type to not have the prefix included in the URLs.
You have to set with_front to false when you register your taxonomy or post type to not have the prefix included in the URLs.
Finally solved the issue. Index.html file in /public_html/ directory was conflicting with index.php file. This awesome article solved the issue. askwpgirl.com/moving-wordpress-from-subdirectory-to-root-faq/
Hope the following code might help add_filter( ‘wp_unique_post_slug’, ‘mg_unique_post_slug’, 10, 6 ); /** * Allow numeric slug * * @param string $slug The slug returned by wp_unique_post_slug(). * @param int $post_ID The post ID that the slug belongs to. * @param string $post_status The status of post that the slug belongs to. * @param string … Read more
I would just add a rewrite rule rather than try to modify query parsing. function wpd_series_query_var( $vars ){ $vars[] = ‘wpd_series’; return $vars; } add_filter( ‘query_vars’, ‘wpd_series_query_var’ ); function wpd_series_rewrite_rule() { add_rewrite_rule( ‘^series/([^/]+)/?$’, ‘index.php?pagename=series&wpd_series=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpd_series_rewrite_rule’ ); Don’t forget to flush_rewrite_rules() after adding new ones. You can then get wpd_series anywhere … Read more
There’s no such thing as a real unicode URL minus encoding of some kind. If you try to write a unicode character into a URL, the browser encodes it. The appearance of the unicode character in the address bar is purely UI assistance. Unicode in URLs For the bits that come after the domain e.g. … Read more
I’d look into using custom post types for the repetitive parts of your permalinks. Cities can be categories, and the restaurant types can be post types. It’s the perfect use for post types, and it helps solve the problem. Unfortunately I can only see it helping with one sub-level. If you need sub-sub-categories you’ll have … Read more
Read AJAX in Plugins. Themes work the same way. So, you get an API, some gotchas inclusive. 🙂 Our tag ajax is quite popular too; you may find some good solutions there.
You are doing everything right, double check the below code and make sure to go to Permalinks in your dashboard to flush the rewrite rules. From WordPress Codex: Note: Visiting the Permalinks screen triggers a flush of rewrite rules. There is no need to save just to flush the rewrite rules. It will work, I … Read more
Currently I can’t offer a full answer to your question, but here as a starting point a (PHP 5.3+/closure) plugin that dumps the global WP_Rewrite object into the shutdown hook. <?php /* Plugin Name: Show WP_Rewrite Dump at the last hook (shutdown) */ add_action( ‘shutdown’, function() { var_dump( $GLOBALS[‘wp_rewrite’] ); } ); This doesn’t take … Read more
From doing some research, I’d recommend trying out this plugin: Redirection. This plugin allows you to manage 301 redirections. I played around with the settings and they allows regular expressions which could do the following: http://some.site/hashtag?tag=some-tag/ to http://some.site/tags/some-tag/ They provide documentation on how to set it up which can be found here. This is what … Read more