Doesn’t seem like you are using an if-statement for showing the sub-pages? If you are not, I guess you can do it with jQuery.
var sub = $("div.subpages");
if (sub.length > 0) {
$("#secondary").hide(); // replace "secondary" with the ID of the sidebar
}
Related Posts:
- Contact Form on WordPress Sites?
- Page returns 404 with POST variables, but not without
- Proper way to get page content
- Password protect page with multiple passwords
- Some pages are missing from the Parent Page select in the Editor
- Set Session Time Limit for Password Protected Posts
- Custom Search Page Pagination Not Working
- How to count current user’s pages?
- Dynamic content in a static page
- WordPress protected Pages
- How To Display Date (/Time/Author) In pages?
- Why is custom template not seen as page with is_page()?
- Displaying Child pages of the current page in post format and their thumbnails (featured image)?
- How do I create multiple page while active a theme
- Static files or dynamic WP pages for “static content”?
- Child page from 2 different parent pages
- Redirect “Sorry, you are not allowed to access this page.” to Home
- select a private page as parent for another private page
- Can I set a timer for pages to be published?
- Add a Menu Link (to a WordPress Page) in the Admin Menu/Sidebar
- Too Many Pages in WordPress? 2013
- How to use the same code for multiple pages?
- Is there a way to create a URL (new WP page) that can only be accessed from a specific source?
- How can I automatically add child pages to pages in a WP menu?
- Job Manager plugin help?
- htaccess modify headers IF url ends with “news”
- How to change only the home page / front page url on wordpress
- Give access to a simple .html file to users that bought a specific ‘digital product’
- List child pages by slug not ID?
- Dash after page title
- How to make tag post listing page working?
- Admin pages, edit notes of the title of posts and pages
- Can’t get done anything with admin.php response
- Role – edit page but not publish
- get_pages() & “child_of”
- Unique page URL redirect to file_get_contents() at domain
- Cannot add a class to h2 tag
- Redirect page to default subpage
- check first and last child pages wordpress
- Special Character Appearing in my WordPress Pages Content
- WordPress pages creation work distribution & then combining – Localhost XAMPP
- Prioritize visible content – Page speed issue on Google insights
- How can I check user capability when a page loads (via functions.php)?
- Add a static page that links to homepage
- How can I get the blog page ID?
- How to have a next page for post?
- Can I change the “Home” text in the menu?
- Search child pages from a specific page parent
- Bad pages redirection
- How to disable delete option for a specific page? [closed]
- Remove_filter (‘the_content’, ‘wpautop’) only pages
- Weebly Migration to WordPress [closed]
- Need to create a custom page on a website
- How To Render Shortcode In AJAX Response?
- How to create different template designs for different pages in WordPress [closed]
- Do I have to widgetize my pages?
- Page templates in subdirectories and auto generator
- Get rid of “comment” field on non-blog pages [duplicate]
- Password Protect Pages Not Working
- Can I connect a page to a taxonomy?
- How to control display of page lists on sidebar that doesn’t have childrens
- wp_nav_menu: output featured image of each page listing
- Is there a template tag/function for getting the URL (or slug or name or ID) of the blog page when using a “static” front page
- Problems in creating a static site with WordPress
- Creating new page/tab in groups section not working! [closed]
- Change displayed “page name” to distinguish multiple pages with the same title
- Add separate list of pages under Admin
- add title to widgets of wordpress
- Custom user tables not working after migration
- remove “Edit” from select pages
- How to transfer a site to hosting?
- Add custom action to the page listing screen
- How to list pages from an author?
- How can a .css file be applied to a virtual page?
- WordPress blog posts template bug [closed]
- Checkboxes to automatically create pages when I activate a theme
- Cannot update page – with too many characters?
- Is it possible to embedd this web app to my website [duplicate]
- Using external DB within wordpress
- Cannot use old slug – it just 301s to site home page
- Author information on all pages
- Display inner pages like posts.[Like how post excerpt works]
- include exception inside theme for empty widget area
- My pages disappeared from the list
- Pre-populating new Page creation with shortcodes
- WordPress Pages “allow comments” meta option can’t be checked
- How to display time when page is created and edited
- Loading internal page
- Firing page_publish where page is child page
- Add text to the bottom of particular pages
- Access wordpress pages using a self signed shared ssl
- Page loads all pages of the image gallery with pagination
- Group Pages based on Parent in Admin Area
- Google indexed pages for one page site
- Parent – Child Pages and Templating in wordpress
- Output the published date / last modified date of specific page
- Remove social media sharing buttons on a download page
- Page-parent field not appearing in editor [closed]
- How to remove container box in WordPress pages? [closed]
- How to change the default location where new post gets stored?