Remove parent page from url
There’s a plugin Custom Permalinks to the rescue. But you have to change the permalink page by page.
There’s a plugin Custom Permalinks to the rescue. But you have to change the permalink page by page.
You just have to set your permalinkstructure to /%postname%/. Special rewrite rules do not need to be done here, as this is a simple setting WordPress handles on it’s own.
Short answer Add this to your functions.php file or wherever you have the rest of this code, assuming this is all in your theme. If this is a plugin, the first two lines need to happen on setup_theme, so you need to hook into that action. Also, if it were me, I’d put everything into … Read more
The only problem that I have found is ‘query_var’ => ‘news’ in register_taxonomy(). Change it to ‘query_var’ => true and it will start working. function create_my_taxonomies() { register_taxonomy( ‘news_categories’, ‘news’, array( ‘labels’ => array( ‘name’ => ‘News Categories’, ‘add_new_item’ => ‘Add New Category’, ‘new_item_name’ => “New Category” ), ‘query_var’ => true, ‘show_ui’ => true, ‘show_tagcloud’ … Read more
No, there should be no issues running multiple multisite installs in a single VVV setup. I have at least 4 multisite installations running on my machine as I type this. Your issue is likely either because your multi-sites are identical, and share database tables and/or URLs, or, you’ve added a subdomain site and you now … Read more
Based on your pastebin of the plugin code, the issue seems to be in the registration of the custom post type. The issue is on line 25. “Rewrite” should be set to true. <?php private $postTypeArgs = array( ‘public’ => true, ‘rewrite’=> false, ‘singular_label’ => ‘mydomainlist’, ‘publicly_queryable’ => true, ‘show_ui’ => true, ‘show_in_menu’ => true, … Read more
You can filter page_link to modify the output of any page’s permalink value. The simplest way to identify the page is by ID, then you can append the query string via add_query_arg: function wpd_append_query_string( $url, $id ) { if( 42 == $id ) { $url = add_query_arg( ‘ngg_force_update’, 1, $url ); } return $url; } … Read more
you sad u have access to phpmyadmin. Go to it, find wp_options table Look for custom_wpadmin_slug in option_name and in option_value column will be your’s custom defined wp-admin slug If you’ll still wount be able to access then remove next lines in .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^{your_wp_admin_slug}/?$ {your_site.com/}wp-login.php [QSA,L] </IfModule> Note that {your_wp_admin_slug} … Read more
Use pagename instead of page_id to query by slug. Note that if a page is a child of another page, pagename has to be the full parent/child path to the page, since slugs only have to be unique per-level in hierarchical post types. See WP_Query for the full list of query vars.
The rewrite rule already exists to handle those requests, it’s for pagination of a single page post type. You can get the value of the page number with get_query_var(‘page’). You can render all pages with the same template by creating a page-{page-name}.php template file.