I found the actual answer in a stackoverflow question.
Quoted from the answer:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'post', 'posts_per_page' => 10, 'paged' => $paged );
$wp_query = new WP_Query($args);
while ( have_posts() ) : the_post(); ?>
<h2><?php the_title() ?></h2>
<?php endwhile; ?>
<!-- then the pagination links -->
<?php next_posts_link( '← Older posts' ); ?>
<?php previous_posts_link( 'Newer posts →' ); ?>
Related Posts:
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- is_singular won’t call my functions?
- taxonomy list display custom post count
- How to let custom post type posts show in standard post archive (like in homepage)?
- Display “Post 2 of 4” on single post page?
- Disable single pages and archives and keep preview
- Slug for standard post post_type
- How to create A-Z index listing for custom post types?
- Need post_type_archive_title function but in ‘single’
- How to show the archive / post type description on Single templates
- Can’t access private custom posttype single- or archives-page
- Display all Categories except ones with a specific parent
- How to achieve a multi-taxomony layout with posts?
- Assign for all post of a post type a specific single-post template
- How to set class to “current-page” on the currently viewed single post within a CPT
- is_singular won’t call my functions?
- Post URL redirecting to homepage
- How can i show multiple post on single post wordpress, just like therichest.com or screenrant.com or hotcars.com.?
- URL of a custom post type’s post format archive?
- create parent post using wp_insert_post
- Filtering WP_Query
- Turn on and off custom post type from admin?
- Missing Posts in Custom Taxonomy List
- Display random posts, but omit the post it is on?
- How do I do this with WordPress? Taxonomies?
- Disable block with taxonomies at post page
- Custom Post Type with archive page but no detail page
- I would like to have different styles for my posts based on the content of each post
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- Custom post type not displaying content from single-{custom post type} page
- Create template for taxonomy results limited by Custom Post Type
- Showing posts from different categories and from custom post type
- Get latest 3 posts from multiple CPT in one query
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Which post does a taxonomy term belongs to?
- custom post type parsed as attachment
- List custom taxonomy specific to one custom post type
- Post image in WordPress not appearing on home page
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Custom post type – get_day_link()
- Meta query for custom post type ignored in main query
- Changing custom type name hides the posts
- Display Ad on Specific Categories
- Change CPT archive title
- Hiding posts by other users and non-logged in
- Update Post Meta for a logged in user
- Add custom field to Posts and sort by it
- Add custom post type settings to wordress default posts
- Single template showing all posts of that type
- Get related posts of child term of custom post type
- Two Custom Post Types Many to Many Relationship
- Problem with displaying posts in the CPT category
- How to get post type and month/year before while loop for date.php file
- JS innerhtml changing style when using AJAX
- Show titles, date of all posts on single category page
- Why is my site using index.php instead of archive?
- A to Z List of Custom Post Type in three columns
- Side effects of Script and Iframe in post
- WordPress showing archive.php instead page
- Programmatically rewriting slug through functions.php but returns 404
- How to change the post type a theme shows by default?
- Set a checkmark in a category based on a URL-parameter
- Several post types on WP Query by tag and taxonomy
- No Permission to add new Page, Post or CPT with Admin role
- Update postmeta Parent when post_status child change
- custom post type category count shortcode
- Portfolio Page for Classic Posts
- Custom post type archive page blank
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Add post location with mile radius allowing search
- Get the category from custom post type
- Is it possible to store Custom Post Type data in separate set of tables and still have wp_post class functionality?
- Set up post page like JAMA articles
- Custom Post Slug same as Parents Category Slug
- Shortcode not working with post counter
- Custom archive page for CPT UI
- Changing default ‘posts’ parameters with register_post_type_args
- Admin Column does not populate with data
- How to display custom post in archive section of the wordpress page?
- How to display single post from custom post type loop?
- Setup template_redirect using has_term when NO term assigned
- How to integrate a form (Ninja Form or Contact Form 7) with Custom Post Types?
- The loop seems stuck to a single (now deleted) post
- Prioritize posts in query by meta keys?
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Use “archive” as slug for custom post type
- Allow users to create posts without logging in?
- How to get all tags of a custom post type by id
- How to define which register_post_status goes to which register_post_type?
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Load Next Posts With AJAX not working with custom post type
- Archive for CPT
- Limit the post for differents custom post type in the same wp_query
- Is it better to use filter for the_content in archive pages?
- 2 Different Custom Post Types in Submenu
- How to assign classes to all elements?
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Some posts from custom post type to subdomains
- How can I get this request to use the Custom Post Type page template instead?
- How can i create an custom post template for an specific post category? [closed]