List Posts and/or Pages by ID

This plugin is designed to list any posts or pages by any taxonomy (category or tag) or post/page ID number.

List Specific Posts by ID Number:
By default no matter what blog a post is created all ID numbers will be unique. That is if you make to pages with the same title and slug on different blogs the ID numbers will be different. So you will need the ID number of each post you want to include. Here is a simplified version of the shortcode.

[netsposts include_post="4,10,13"]
Various Night Sky Images
This is a collection of photographs from the night sky around the globe. read more ❯

My Libraries
Published 9/3/2017 in Profile John Cardell
This is a default with the manual excerpt field populated. read more ❯

My New Novel Updates
Published 9/3/2017 in Profile John Cardell
This is a default with the manual excerpt field populated. read more ❯

As you can see from the list above it shows three different post from two different blogs. Since no blogs were specified from the shortcode it will default to all blogs.

If you wanted to show pages the shortcode would have to be modified to the following:

[netsposts post_type="page" include_post="5,7"]

==== List of Pages Should Have Shown Here ====

Notice it still uses the attribute – include_post= . That’s because WordPress lists posts and pages equally when referencing by ID number. If you go to your page or post edit screen you will see something similar to the following:

/wp-admin/post.php?post=7&action=edit

Notice how it says “post=”. This is a listing of a page but it still used the post= id number identifier. That’s why you use include_post= for all post or pages to include in listing.

Important Note The above is important because a lot of people use the wrong post_type format and want to know why their posts or pages aren’t listed.

You may also list posts and pages in a single shortcode attribute by doing the following:

[netsposts post_type="page,post" include_post="4,5,7,10,13"]
Various Night Sky Images
This is a collection of photographs from the night sky around the globe. read more ❯

Store Action
Published 9/3/2017 in Premium WordPress Plugins
This page has been created by WP eStore plugin. Please do not delete it. You can hide this page from your navigation... read more ❯

My Libraries
Published 9/3/2017 in Profile John Cardell
This is a default with the manual excerpt field populated. read more ❯

My New Novel Updates
Published 9/3/2017 in Profile John Cardell
This is a default with the manual excerpt field populated. read more ❯

Network Posts Extended
Published 9/3/2017 in Wordpress Plugins
This page lists the help pages for the Network Posts Extended Plugin read more ❯

Website Under Construction
Published 8/27/2017 in Wordpress Plugins

Look above and notice I have only included 5 posts but 6 are shown. That’s because the WP eStore Plugin automatically created a page called “Store Action” and assigned it ID number 10. The post “My New Novel Updates” also has a post ID of 10. This is an anomaly and sometimes happens when a plugin automatically creates a post or page. If I had post_type=”page” or just post_type=”post” you wouldn’t notice it because it will list one or the other. Since I used post_type=”post,page” it shows both. The only way to correct this is to delete one or the other and recreate it.

The “Store Action” page is the one I want hidden so to make things easy I will delete and create that one again. Let’s see if that works by looking below:

[netsposts post_type="page,post" include_post="4,5,7,10,13"]
Various Night Sky Images
This is a collection of photographs from the night sky around the globe. read more ❯

My Libraries
Published 9/3/2017 in Profile John Cardell
This is a default with the manual excerpt field populated. read more ❯

My New Novel Updates
Published 9/3/2017 in Profile John Cardell
This is a default with the manual excerpt field populated. read more ❯

Network Posts Extended
Published 9/3/2017 in Wordpress Plugins
This page lists the help pages for the Network Posts Extended Plugin read more ❯

Website Under Construction
Published 8/27/2017 in Wordpress Plugins

The “Store Action” page is no longer shown because after deleting and creating it again WordPress assigned it ID number 39. This is the only way to correct anomalies. So if you see a post or page that you didn’t mean to include you know it just has the same ID number and you must delete and re-create one or the other. 🙂

Note: The exclude and include arguments are not to be used at the same time. If they are the plugin gives priority to the include_post=””.