How to change templates based on URL

Provided not showing the sidebar is the only difference you really want between the way pages are displayed, you can load the sidebar conditionally with something like this in your page.php (or whatever file your theme is using to load the page): <?php if ( strpos($_SERVER[‘REQUEST_URI’],’/register’) == false ) { // if requested uri DOESN’T … Read more

Questions on WordPress Codex Concept

Adding here. register_post_type function have a parameter public which controls how the type is visible to authors and readers. If public parameter of a post type is true then post type will be exclude_from_search, publicly_queryable, show_in_nav_menus, and show_ui. Read more about it in register_post_type function. Also all post types must be registered to use in … Read more

Remove Url Parameter WordPress

The “s” variable parameter is for the search term and is used when there’s a search on a WordPress site. If you have a form that users are filling out, there should be code similar to: <input type=”text” value=”<?php the_search_query(); ?>” name=”s” id=”s” /> Delete that input tag and the “s” will disappear.