I figured out a solution. It works, not entirely sure if it’s best practice but I queried the posts first and it seems to show up.
Here’s my code;
<?php query_posts('showposts=2'); if (have_posts()) : while (have_posts()) : the_post(); ?>
I then closed the if statement with;
<?php endif; wp_reset_query(); ?>
Related Posts:
- How do I get blog posts to appear within CMS?
- Determine if page is the Posts Page
- Stop WP from creating “Sample Page” and “Hello World!” post
- Keyboard shortcut for updating a page or post?
- Apply the_title() filter in post & page title, but not in menu title
- How to display by default only published posts/pages in the admin area?
- Difference between an archive and a page listing posts
- The next_posts_link() works only with original $wp_query
- Using single.php from plugin folder instead of default template folder
- Skipping first 3 posts in wp query
- How to display the page title/content in the Posts page?
- Callback for wp.autosave.server.triggerSave();
- How can I see a list of pages and post where my custom Gutenberg block is used?
- disable password protected page for logged users
- RSS for Pages Instead of Posts?
- Display posts by tag on page
- Exclude category on blog list page
- Set number of article per number of page
- Pagination for Pages and Posts
- Overview with latest edited posts and pages
- Creating new page with pre-defined parent page
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Edit menu item title from edit page/post
- Changing my permalink structure – will new layout conflict with existing page?
- disable column on post and user list
- How can I display widget in a Page or Post?
- Differentiate between posts and pages in search results
- Private Posts/Pages & Search
- White Blank Page when Updating and Publishing Page/Post
- Posts vs. Pages
- Blog Posts not showing title
- Can’t get the_content of the parent page from its single post?
- Disable most recent & view all (TABS) on nav-menu.php
- Why content_arr[‘extended’] removes paragraph tags?
- How can I schedule a PAGE to go live at a future date/time?
- Add Word Limit to Posts
- How to insert 2 args into 1 Wp_Query for a slideshow
- Apply a style for 4 blogs and another style for the next 4 blogs in wordpress blog page?
- Post categories to pages
- Second comments section for one post/page
- 404 error on default post type and default taxonomy fronted page
- When open add new post or page WordPress add post with ID=0 continuously [closed]
- How do I do a page break?
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- 2 dynamic sidebars registered, not showing up
- How to make default “Privacy Policy Page” a normal page?
- How to detect when admin user is on the All Posts page?
- static landing page leading to author specific pages w/ “live” content
- Total number of posts in query (category/tag/author/search results/main page…)
- Custom Permalink Structure for Pages & Posts
- Getting a “404 Not Found” error when “Preview Changes” is clicked
- New Posts and Pages Won’t Save
- My Custom Post Type Still Using index.php
- Post/page title to permalink transformation – what is behind the scenes?
- Would a “hub” page work better as a page or a post?
- Changing wp_link_pages() to “Next Page” and “Previous Page” buttons?
- Page of posts made to look like homepage
- How to link post titles on page A to its posts on page B?
- Different post views for different category views
- Changing permalink of WordPress
- Indenting within a blockquote
- Permanently deleted posts still exist
- Create a List of Widgets, where each widget holds three attributes
- Change published date and time using SQL query for page in every 5 hour
- Is there a way to know when a page has been updated and do some action only once?
- Please help a newbie with blog page issue?
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- Added a ACF field to custom page and want the results to show as a column in admin
- Deleted page still shows and is showing posts archive
- How to create page with post content in it?
- Put page on Archived statut after end of publication date
- How to add a block to a category page?
- post and page and custom post type
- Single Sidebar; multiple templates! How?
- calling pages instead of posts
- Post Category link is same with Page link
- Is it possible to query a category with specified posts?
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- Permalink base only for posts
- Precedence of page permalinks over woocommerce product category links?
- WordPress URL question
- Theme does not respect spaces between paragraphs in pages
- Page and Posts loading as index page? Not loading the content
- My blog “page” used to show a list of posts, but now it’s just showing the page content?
- Converting Posts to Pages
- Posts page template: How can I edit the markup for this?
- 404 error on every post and page other than home
- Using Post ID and Page ID in same function
- get next/previous post name
- Get post title of faulty link on 404 error page
- Get current post’s child page?
- How to display a paginated list of posts from one category on a page? [duplicate]
- The next_posts_link() works only with original $wp_query
- Limit amount of pages shown in pagination within wp_query
- how to show all type of author posts in author page (SOLVED)
- custom post type single page template not working
- How to make posts appear under pages
- When and how will php code in a user made WordPress page be executed?
- WordPress Page Column Problem [closed]
- What function does the loop of displaying posts?