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?
- Restrict custom post type to only site administrator role
- Get custom post type slug for an archive page
- How to force one column layout on custom post type edit page?
- WordPress REST Create Post of Custom Type
- Change plugin’s has_archive = true to false?
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- IF statement in a do_shortcode
- Make `previous_post_link()` Function Show The Post After Next i.e. Jump A Post
- How do I create an archive page for standard posts?
- WordPress custom post type archive with description
- Get post type from taxonomy or category page
- custom taxonomy archive by year
- Remove parent from custom post type
- Remove All, Published and Trashed Post Views in Custom Post Type
- pagination redirecting from page number url before page requested
- How to add post_type=value when editing that post type in the WordPress admin?
- CPT Archive with core Category
- Open Custom Post Type as PDF
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Update Post Meta for a logged in user
- WordPress showing archive.php instead page
- 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?
- 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?
- Permalink misbehaving in Custom Post Types
- Is it a good idea to add a column to the posts table?
- Display Only Certain Category In a Custom Page Template
- Assign CPT archive page attributes
- Creating separate feeds for custom post types
- hide specific div on single.php [closed]
- wordpress lists similar type of posts in a custom post type
- Auto post creation
- How do I find a way to create a global single.php for a custom post type?
- How to use single.php for creating, reading and editing Custom Posts with ACF
- Display Date & Author Info on Custom Post Type Archive Page
- How to constrain the results to a specific post_type on tag archive page?
- Easy reading or transfer of data from posts?
- list posts of two post types in a single template
- The loop does not show users
- How to prevent a custom post type from using the archive.php template?
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- Front-end Image Upload to Custom Meta Box
- Create a custom post type based on ‘Post’
- Conflict in function to allow single post template based on category
- Invalid content when I try to import custom post type from the old template wordpress
- Why is my custom post content only viewable when signed into WordPress?
- Add a form in every post and save data in post meta
- How to set post date in post_type so that it’s same as latest post in category
- Right way to store a large set of similar information on website? [duplicate]
- Custom post type single page 404
- Create a post automatically if search result has zero results
- Correct way adding External classes to Custom Post type and output their methods to template
- Custom Post type page content (archive page)
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- Group custom post type posts by month
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Custom post types not showing on the standard WordPress Category page
- Assign a Post to a User
- Cannot save pages after migration
- Bulk trashing post ‘fails’
- Rest Api not working with Iframe in form data
- Why custom post redirecting to index page?
- Custom Archive – hide posts until a search is made?
- Use WP pagination functions on a custom page template
- Event Manager: Events Deleted are still in DB as published but hidden in admin
- Single Post (CPT) in two pages – Normal and Extended
- Limit or filter edit view in the dashboard to a specific ID only?
- How to add New Post On clicking a button?
- Why isn’t my custom post type using the corresponding custom post template?
- Single page problem when permalink type changed
- Linking custom taxonomies and posts
- Search page for custom post type
- Custom post types with date based archive
- how to remove user name and date in post page
- How to make a template for a specific post of a custom post type?
- How to hide home title on pages and posts?
- Front end post or photo or both
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- How to make a non-public post on wordpress approval?
- How Do I Add a Custom Post Type URL to Content?
- is therer any wordpress function to retrieve a specific html element from post content