We have learned ho to manipulate WordPress posts using short code and display-posts, if you miss any, following list will help you
Widgets are the objects or controls that can be place in side bars, you can customize them using the Customize button under Design [Block Editor] or Appearance – Customize [ Classic Editor/WP-Admin panel].
Our aim is to create a Text Widget for side bar and place some category post inside.
- Create Text Widget using Customize Widget
- add the following Short code in the content section
[above code her]
That’s all , you can see live view of widget example at the top right sidebar titled as WordPress Tips
I have went through a beautiful Jetpack plugin, display-posts, in case you miss them here is the posts I recommend.
What is category post ? Post that are composed in specific category is called category posts. All posts are category posts.
How do we list them ?
Using display-posts we can make a list of posts. So let’s build a list with short code
[above lines here]
The above short code can place any where in the content area which list Category posts lies under Python
We have learned so far how to use listing projects with short codes , with content, excerpts, image and lots of customization. If you ever miss them here it is
- Display random projects using short code block in WordPress - How to list random portfolio projects using short code
- Display specific type of portfolios using Short Code in WordPress - How to list a specific type of portfolio project using short code block in Word Press.
- Organize Portfolio projects in WordPress as Page - How to organize portfolio projects in WordPress with Pages and Short code block
Post inside a Post
Place a post inside another post or page. Sound crazy ? You can do this with Display-posts plugin which can be used as short code .
Do you know that you can place short code not only in short code block but also a paragraph block or in classic editor as [ short code here].
First we have to find the post ID ( each WP post comes with unique post id, you can find them in posts by pointing the post title, in the status bars it will show as post=2005) , since we need a single post and use it in short code as follows.
As we all know short code appear inside of opening( [ ) and closing (]) square brackets.
display-posts id=2419 include_content=true
[ short code here ]
display-posts – Example
Using the id we can specify the post ids, in case of multiple post separate with comma (,) , also want to show content after the title , so used the include_content option which is by default set to false.