… on my homepage and one other page
i dont want to have the sidebar.
You can tell WordPress to do not generate sidebar on specific page(s) with simple condition in your page.php file (or other relevant template file).
For example the following piece of code will disable sidebar on ‘About Me’ page.
<?php if (!is_page('about-me')) get_sidebar(); ?>
*Note: you can use numeric ID or slug of your page inside the is_page() function.*
Related Posts:
- Opinions and recommendations on the best barebones base theme [closed]
- Adding admin-ajax.php to the frontend. Good or bad idea?
- Different template of products for specific category. WooCommerce
- what the best way to include images from the template’s images folder?
- WordPress 5 / Gutenberg – theme doesn’t have featured image option showing up
- How to refresh WordPress Customizer panel upon entering a value
- Set Featured Image for Archive templates
- How do I add a new string to a .po or .pot file?
- Free/Open-Source Theme Frameworks as an Alternate to Thesis? [closed]
- can require “themefolder/includes/widgets.php” in “themefolder/functions.php” yet widgets.php doesn’t run
- Multisite: setting theme and options when a new blog is created
- How do I change Twenty Nineteen’s primary color without using the color slider in the theme customizer?
- How to add the main style.css to my index.php?
- How to attach region identifier to a pretty url?
- Remove action within a class in a parent theme from the child theme
- How to get themes from wordpress.com per SVN? [closed]
- Edit raw HTML of the landing page
- How to move WordPress theme files into a subfolder without breaking the theme?
- remove rel=next on home page but not others
- Disable Sidebar in the Product Page in Storefront Theme [closed]
- How do you create a custom WPTouch theme?
- Added a new template file to a theme – get Call to undefined function error
- Renaming the Twenty Fourteen WordPress theme
- Defining different theme for Blog posts page
- Working with an Array inside Your Theme Options Array – Multiple Values
- Theme Development Admin Area [closed]
- adding multiple sidebars on pages
- Varying Search Result Pages
- Add js into a theme [closed]
- How to know if user choose to show full post or excerpt?
- .htaccess edits
- Broken link to theme asset after restoring backup
- Create more than one section in Theme Customizer
- Theme settings default, strange behavior before first save
- Is that worth it to find a designer for creating a WordPress theme for selling on ThemeForest? [closed]
- Howto keep header image when changing theme
- Get name of current page template in Gutenberg era
- Mobile issue – website isn’t properly detecting screen size [closed]
- Redux callback action
- Problem of running development copy of WordPress on WebMatrix?
- translation does not work for ‘Home’
- Should I implement my own custom theme
- How to translate a string that contains a WordPress sitename
- How can I manually activate my previous theme without browser access to dashboard?
- Advantages of wordpress theme vs wordpress as a backend only [closed]
- Is that a malicious code?
- Creating custom meta box throws PHP warning error in WordPress
- What is the point of needing add_theme_support( ‘html5’) in WordPress 5.x
- Plugin and themes are adding the same stylesheets
- WordPress EduPress and businessbite Theme Installation Failed [closed]
- How can my user make their own Blog/Diary
- Where do I find (free) fully-internationalized themes? [closed]
- How do I manually revert back to my old theme?
- Modifying the markup in the Tag Cloud widget?
- How to trace and resolve a theme problem such as flickering links in WordPress? [closed]
- Child theme looks different from parent theme, and incorrectly displays parts
- Adding an extra sidebar to your theme
- Widgets not showing on sidebars
- linking to an svg through comments_popup_link
- Create Custom Attachment Template That is Processed from Plugin Folder?
- Implementation of language_attributes function
- my blog crashes ie7?
- How would I got about calling a php file every time someone publishes a new post?
- Custom theme – pages in menu
- remove preloader in WordPress theme [closed]
- Setting Multiple Post Containers Across Homepage And Costumize Them
- Flexslider in child theme
- How to edit the default comment title?
- Why my function.php file in theme delete automatically? [closed]
- How to reverse the pagination numbers of an archive?
- Theme translates the_author_posts_link. How can I remove their translation?
- Theme CSS missing completely
- How to implement this layout?
- WordPress customizer extremely slow, cant work in it
- Missing privacy policy checkbox on login page (using Enfold theme)
- How exactly does WordPress load themes from api.wordpress.org?
- Themes don’t show up in the dashboard -> Appearance -> Themes
- Let custom text widget use the same font as the theme
- SSL errors when I activate my custom theme
- How to show taxonomy in WordPress shortcode
- wordpress theme link url
- Work on theme files on a server & browser preview before installing it
- Route to custom file
- “Template is missing” install error on non-child theme
- div having different appearances in different themes
- wordpress template page Usage [duplicate]
- No “available widgets” (wordpress 3.2.1 multisite)
- How to create a second index.php?
- Lightword Theme – only one menu item
- How to make a website like the ones in theme demos? [closed]
- how to use Easy Docs theme to write a book?
- Divi theme including javascript
- 2 WP websites same content different themes
- How is WordPress child related to Buddypress child theme
- Remove ALL HTML from single page
- Remove Google Fonts from parent theme within a child theme [closed]
- Define a Custom Template Part As A Widget Area
- Changing Sidebar In 2023 Theme
- Remove image next to header image on WellExpo theme [closed]
- Table of Contents in Left Navbar [closed]