Thought so…
You are using query_posts()
and this nukes native page’s loop and replaces all relevant data with your query. Since your query isn’t for page – your page is no longer treated as such.
Always use get_posts()
or new WP_Query
object for secondary loops.
See When should you use WP_Query vs query_posts() vs get_posts()?
Related Posts:
- Backup the Database and Restore from the Backup?
- Scaling a WP eCommerce site
- Looking for a lightweight theme using WP3 new tags and features (not 2010) [closed]
- Limit Media Library to Given Folder
- How can I get posts in a subcategory to display on it’s parent categories archive page?
- Creating my own Admin Forms in a WordPress CMS?
- Custom taxonomy: same terms, but for different years
- customize_register with Multiple controls/settings – how to get values?
- Best practices for A/B testing?
- Editing the Number at the end of Page URLs / Editing Page Slugs
- Integrating the WordPress admin panel with a frontend theme
- simple wp_insert_post example
- Redirect members to custom page upon logging in through WP admin
- Can I use $wpdb for my custom tables in the WordPress database?
- How to get input_attrs in the sanitize function?
- Integrating MailChimp newsletters as post
- What is WordPress file encoding?
- Change from /wp-admin/ to something else?
- WP_Query with the “offset” argument
- Adding “Interesting Tags” & “Ignored Tags” like StackOverflow.com in a WordPress Blog?
- Auto add taxonomy if post has category
- Add a containing DIV to core Gutenberg blocks
- Allow comments without approval for custom content type
- Add ‘Right Now’ widget to custom dashboard
- Are there any security issues with setting the WP_INSTALLING constant to true?
- Naming script handles right way
- How to add classes in the wp_list_category parent link
- How to edit pages after installing WP
- Exclude custom taxonomy tag from loop
- Multiple WordPress outside wordPress installation?
- WordPress generated links – menus and home_url() – not using https despite settings
- How to use
- Name/Word Replacement Plugin
- Get page ID outside the loop, matching menu ID
- How to check if a custom user profile field is empty
- Author Tracking Code!
- Viewing checkout page removes fees from mini cart
- Change the Labels of Users to Customers in Admin
- help to change some colors (woocomerce and store locator) [closed]
- Show Featured Post Only On The Homepage
- How can I create a second multisite network in a subdirectory?
- How do i remove animated icon [closed]
- order event posts by multiple custom fields
- Custom Role with Own Page Edit Capability
- List top 5 authors with most posts
- Looking replicate static HTML Menu into WordPress Dynamic Menu [closed]
- CSS Styling a specific page
- How can I start over on my site? [closed]
- Plugin to allow registered users to customize their layout [closed]
- Custom Columns WordPress Admin
- Get users based on month ACF datepicker field
- Trigger Customizer Publish (save) Action
- Edit value=”” of a button in child theme
- External Link Button Under Post Excerpt on Index.php
- How to custom post navigation
- Showing different pages depending on a cookie value
- WP function duplicating body content
- Custom section (e.g. Demos or Downloads)
- WooCommer Product Category Loop – How to change the display order of the rating and price?
- How to Remove the Custom Theme Panel from a Theme?
- Replace TimThumb in existing WordPress Themes
- Moved wp-content and got problem with themes directory?
- title tag function
- How to do multi site setup
- WP Search Form Query: Add Author’s posts into search query
- Creating a “Delete”-Button for Metadata userspecific
- Change default Video Player without Plugin
- Changing update message from Newspaper child theme
- Custom default settings for WP native Gallery Block
- export and import wordpress customization
- where is admin footer?
- How can i add customisation of text to my theme?
- Can I overwrite custom taxonomy FROM “public” TO “false”
- Trying to customise 2011 Child Theme Background Colour
- New Page/Post Screen Opens an Existing Post
- Custom product status get filtered on all product list views
- the temporary save folder is wrong
- URL issue after setting up Custom Structure in Settings >> Permalinks
- Can I upload my self hosted WordPress website on GitHub as a project? [closed]
- Need to replace some text string on a title
- Custom roles and capabilities media not work right
- How to customize WordPress vertical menu?
- Create single{custom}.php with data in table out of wp_posts
- How do i edit text that is not in the customization menu
- How do I map two domains to the same wordpress installation?
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- Where should I put this custom data?
- Changing starting number of User ID
- how to register / add multiple options into one field in wordpress?
- Custom WP deactivate an email activation link sent to user’s email.
- How to duplicate “Pages” section in the control panel?
- WordPress Customize panel – accessing the values
- Page template with custom html fields inside a content
- Show post content in two different places without redirect
- Multiple Customizers
- How to move menu next to left of the search box?
- how to manage Session in WordPress using custom login?
- Background image no more visible in the preview
- I need to make the title of the page dynamic in my custom plugin
- Custom CSS working on home page but not on NEW created PAGE