rewrite rule of post when accessed from archives pages
rewrite rule of post when accessed from archives pages
rewrite rule of post when accessed from archives pages
Add dynamic url with external page in WordPress
Remove Page Slug from URL
function my_custom_post_work() { $labels = array( ‘name’ => _x( ‘Store’, ‘post type general name’ ), ‘singular_name’ => _x( ‘Store’, ‘post type singular name’ ), ‘add_new’ => _x( ‘Add New’, ‘Store’ ), ‘add_new_item’ => __( ‘Add New Store’ ), ‘edit_item’ => __( ‘Edit Store’ ), ‘new_item’ => __( ‘New Store’ ), ‘all_items’ => __( ‘All Store’ … Read more
This exact piece of code works, the reason for redirect was some other plugin. To create as many child pages you want dynamically you just need to this just hook it to ‘init’ hook. add_action(‘init’,’my_custom_rewrite_rules’ ); function my_custom_rewrite_rules(){ add_rewrite_tag( ‘%make%’, ‘([^/]+)’ ); add_rewrite_rule(‘^cars/([^/]+)/?’,’index.php?make=$matches[1]’,’top’); //or To go to a published page. add_rewrite_rule(‘^cars/([^/]+)/?’,’index.php?pagename=page-slug&make=$matches[1]’,’top’); } If you want … Read more
Add a hidden input field to your form with name page and value my-wordpress-plugin, When the form is submitted it will be passed along with your other form data. <input type=”hidden” name=”page” value=”my-wordpress-plugin”>
Thanks @cybmeta for your hint. I searched my theme and found an other flush_rewrite_rules(true); on the init hook. I removed this and now the rule is being remembered. Seemingly, calling the function twice is breaking something. Doesn’t really make sense to me, but it works now, so whatever 🙂
It seems to be redirected to “http://www.zeekray.com/en/” . But you don’t have a folder like “/en”, as far as I can see here http://www.zeekray.com , where the folders are shown.
For the sake of anyone interested in the answer to this question, I am posting here the following answer that I received in the WordPress.org support forums. leejosepho graciously provided the following answer: Yes, that is possible. Save ‘http://dem0site.net‘ in both boxes at Dashboard > Settings > General, then cPanel-assign and -point your domain to … Read more
taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts