Tag Info

New answers tagged


Add this on your register post type function: 'rewrite' => array( 'slug' => 'news', 'with_front' => false ), The "with_front => false" will remove the "blog" from the path. Hope that it helps, Cheers


For normal posts you can set the permalink structure on Settings → Permalinks. All details can be found in the Codex For custom post types you can set the slug when you registering it: add_action( 'init', 'create_posttype' ); function create_posttype() { register_post_type( 'cpost', array( 'labels' => array( 'name' => __( ...


Add this in your functions.php function my_reg_page( $register_url ) { return home_url() . '/register/'; } add_filter( 'register_url', 'my_reg_page' ); This example would return a registration URL http://Yourdomain.com/register/ for the wp_registration_url() function


To expand a bit on what eddiemoya did above: Like the original poster of this question I wanted to create a custom rewrite, and also deliver a custom template for that rewrite page. The code from edditmoya got me started in the right direction, and I added an extra function to serve up my custom template when the page is accessed. The custom template could ...


This is outside the realm of WordPress. I'll give you a basic answer that should help you figure out what you need to do. The general idea is you will point your new domain names to point to your web server's IP address. Then your web server will see which domain name is being called and then route it accordingly. If you have a dedicated server, you'll ...


You could make a list of paths to check... $page_paths = array( 'analysis/firstNamelastName', 'exercise/firstNamelastName' ); Then check if there's a page object for each of the page paths. foreach($page_paths as $page_path){ $page = get_page_by_path($page_path); if(!$page){ echo '<code>'.$page_path.'</code> Does not ...


It appears from your post that somehow the rewrite rules in your .htaccess file were lost/reset/corrupted. As long as your register_post_type() code remains unchanges, you can visit "Settings > Permalinks" to reset them and fix your issue.


You will need to use site_url($path_to_style_sheet, 'https') instead of bloginfo(). The home_url() method also supports https.

Top 50 recent answers are included