Instead of calling get_sidebar()
call get_sidebar( 'somethingelse' );
. It will attempt to load sidebar-somethingelse.php
and if that doesn’t exist it will load sidebar.php
. You can then modify the sidebar-somethingelse.php
to load a different sidebar etc
I strongly recommend you look up how the template hierarchy works.
Related Posts:
- Register/Get sidebar?
- Showing sidebar-2 on custom template page
- Custom page sidebar using Template dropdown box
- Custom page template to sidebar/widget
- Content not showing up when using custom template + sidebar
- different sidebars depending on template (is_page_template is not working)
- E-Commerce Products Page Sidebar Formatting
- How to edit contents of dynamic_sidebar()?
- is_page_template not working
- When is get_template_part() preferable to simply using the template.php files?
- HowTo: Add Class to Sidebar Widget List-Items
- Having different sidebar content for MANY pages?
- dynamic_sidebar not rendering sidebar
- Simplest way to add a second html editor to the post/page admin?
- Add div class to only one widget
- Store Page Template Files in a Subfolder
- Custom sidebar not showing in the dashboard
- Different “Text Widgets” in Sidebar on Many Different Pages?
- Video Background – (php & css) – generating 404 error on page load – WordPress Theme File Structure Help
- Created custom post type but selected template not staying selected
- Why is POST’ing to my WP page template producing a 404?
- Are page/post IDs unique across a whole network?
- Grabbing the page template name?
- Adding the Admin Bar to a page with a custom template
- wp_title() handling of author page
- Best practices: Custom theme sidebar menu – hardcode or widget?
- More flexible sidebar and widget management
- How to edit 404 content via wp editor?
- Removing custom widget area WordPress 4.4 [closed]
- wp_redirect() does not work in custom template file
- Programatically changing template of a page
- How can you add a link to a sidebar description?
- Cannot save widgets in custom sidebars
- unregister_sidebar() in stand-alone theme not working
- Creating a new page template
- Unexpected results with conditionals inside template part
- Visual Editor Templates
- Pre get posts where template is not equal to one specified?
- Change content of page in child theme using plugin
- Can two custom templates be used to create a single page?
- Use the_title_attribute() for the WHERE parameter in a page template
- Find the page template of the previous page
- How to check if a specific page uses a page template?
- Widgets not activated alert after using get_sidebar()
- Conditional get template part
- Cant remove line that appears above page content
- Trying to return list of child pages for a template
- Page template without header & footer
- Adding Multiple Sidebars
- Page template for blog not working
- I want to duplicate homepage for all my pages
- WordPress showing 404 page template for unpublished posts
- Change Post Template based on post meta?
- How to rewrite title- and meta-description templates for page templates in Yoast Plugin [closed]
- !is_page_template not working with && operator
- Is there a way to create a template that does not have the site styling associated with it?
- Sidebar widget not displaying after simple code update.
- Is it possible to add a child post into the parent page?
- Dynamic sidebar rendered in another place than i would like
- Is it okay to use page template as contact page? [closed]
- Including facebook.php in a wordpress page template?
- is_front_page and is_home are not working in page.php
- How to build a PDF repository in WordPress
- Page with posts from category doesn’t work
- Why is a renamed custom template file still showing up in the template dropdown menu?
- Page template added via plugin not saved in Gutenberg
- How can I load 2 random pages?
- Blog page wont use blog-template.php
- Delete post: 2 wp_redirect if pages are different
- The best way to create pages like an ‘about’, ‘contact’ and etc [closed]
- Image not showing on page template in Twenty Fifteen-theme
- Limit page template choice by page title or ID?
- WordPress custom login and register page problem?
- Using conditional statements in place of custom Page templates
- Controlling the Admin panel for page templates
- Page Templates automatically showing index page contents?
- Custom sidebars – get_sidebar() problems
- Add featured image as post header background image
- Create Page with Pagetemplate and get a post_type_object->template
- WordPress pass url to page template when page does not exist
- Inserting article:tags meta in html head-element, using get tags, no wp_head
- wp_logout() not working after form submission
- Set page title in WordPress with PHP
- How to allow user to select page template from front end?
- Converted HTML5 to WP, How to apply converted classes to new pages (after conversion completed)
- Custom page template displays the archive template
- How to get template link?
- Using a page-template to restrict access based on IP (Frontend)
- Need help in creating splash intro page using custom page template
- Adding secondary featured image for page_for_posts
- Call Multiple Sidebars at once
- What is the best way to create very custom campaign pages?
- Custom Forget Password page
- Using page template as Static Front Page
- How to make page template with admin able to select NextGen Galleries to be part of the layout?
- Background of default template showing instead of the background of custom page template
- Videopress Short Tags not working when pulling page into template
- Article Template
- Front end user registration form [closed]
- Extra HTML code added to my (on Chrome DevTools) but not on source code