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
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.
Short code 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.
We have seen how to use short code to play with portfolio projects, I have few more posts in this category.
How about a random wise project list , in a page or post, which changes the order each time load. A customization of short code will make it possible
portfolio showposts=3 orderby=rand
You can specify number columns using columns parameter and number of posts using showposts parameter
display_types: display Project Types – displayed by default. (true/false)
display_tags: display Project Tag – displayed by default. (true/false)
display_content: display project content – displayed by default. (true/false)
display_author: display project author name – hidden by default. (true/false)
include_type: display specific Project Types. Defaults to all. (comma-separated list of Project Type slugs)
include_tag: display specific Project Tags. Defaults to all. (comma-separated list of Project Tag slugs)
columns: number of columns in shortcode. Defaults to 2. (number, 1-6)
showposts: number of projects to display. Defaults to all. (number)
order: display projects in ascending or descending order. Defaults to ASC for sorting in ascending order, but you can reverse the order by using DESC to display projects in descending order instead. (ASC/DESC)
orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)
Create category post widget in WordPress-We have learned ho to manipulate WordPress posts using short code and display-posts, if you miss any, following list will help you Widgets 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 … Continue reading Create category post widget in WordPress