Adding post to pages on Canard theme
-
I have a blog with the following menu:
Home – Restaurants – Homemade – About – Contact
I want to have to posts about restaurants under the ‘Restaurant’ page, and the posts about recipes under the ‘Homemade’ page.
However if I go to the ‘Restaurants’ page, it forces me to write a post, but what I want is to add all the post about restaurants that I have already!
Is there a way to do this?
Thank you.The blog I need help with is: (visible only to logged in users)
-
Hello @bertieandtheycity
There are 2 ways to do this:
1. Using the display posts shortcode:
You can use the display posts shortcode to show posts under a page.For example, if you have posts with category restaurant and want these posts to be available under the Restaurants page then you can add this shortcode to the page:
[display-posts category="restaurants" posts_per_page="-1" include_date="true" order="ASC" orderby="title"]
More information about using this shortcode can be found here:
https://en.support.wordpress.com/display-posts-shortcode/2. Creating Category Page:
You can create category pages by following this official support guide: https://en.support.wordpress.com/category-pages/Hope these help 🙂
-
Hi otpidusprime,
Thanks for your quick response! It’s been very useful.
I have noticed that:
– If I do Option 1, then on the new page I will have just a list with all the Restaurants posts, but not an image with an excerpt like on the Homepage.
– If I do Option 2, then I do have images and excerpts, but then on the top of the page it says “Category: Restaurants”.
Is there a way to get rid of that on the top of the page so it looks a bit neater?Best wishes,
Bertie -
FOR OPTION 1:
For excerpts you can add include_excerpt=”true” into the shortcode like this:[display-posts category="restaurants" include_excerpt="true" posts_per_page="-1" include_date="true" order="ASC" orderby="title"]
For thumbnails i am not sure, but you can try this:
[display-posts category="restaurants" include_excerpt="true" image_size="thumbnail" posts_per_page="-1" include_date="true" order="ASC" orderby="title"]
I added image_size=”thumbnail” for images, see if it works and let us know.
FOR OPTION 2:
Category pages by default show the “Category: Restaurants” title. If you want to hide it you can do that by using CSS codes.NOTE: Editing CSS codes is a part of the paid WordPress.COM Premium and Business plans.
So if you are on any one of those plans you can use this CSS to hide “Category: Restaurants” at the top:
.page-title { display: none; }More information about editing CSS can be found here: https://en.support.wordpress.com/custom-design/editing-css/
- The topic ‘Adding post to pages on Canard theme’ is closed to new replies.