How to show posts from a specific category on a specific page

My goal is to show posts from a specific category on a specific page. The page shall not act as a usual category page which is implemented by WordPress. The page shall use different panels and tabs where the posts shall appear. For the panels and tabs I use EBS shortcodes. The design of page and posts shall be based on the Dazzling Theme. I tried using the “Posts in Page”-Plugin by ivycat while using shortcodes. It does exactly what I want but the design of the posts does not look like the Dazzling Theme (The following items are missing: featured image, read more link, author and date). Maybe I have to create a page template which can be added to the shortcode. But I don’t know how. Can you help me or do you have an easier way how to get this working?

Hi @lg2000,

I hope you are well today and thank you for your question.

To achieve this you will have to develop custom code.

The Posts-in-Page plugin allows your to change the output generated by shortcodes by creating custom template file in the root directory of your child theme and referring them in the shortcode using the template argument of shortcode as displayed below.


[ic_add_posts template='template-in-theme-dir.php']

The default template used by shortcode is posts_loop_template.php which you can just copy to your theme directory and make changes as necessary.

You can even rename it but in that case make sure to indicate that in the shortcode as described above.

You can even use different templates for each shortcode if you like.

Find more information about it on the following page.

Best Regards,
Movin

Hi Movin,

thanks for the reply. The goal is that all posts which I address by using the shortcode (ic_add_posts) shall look like they look on the categories page of the Dazzling theme. My page has code like this:

`[tabs class=“yourcustomclass”]
[tab title=“Cat 1” active=“active”]
[ic_add_posts category=‘cat1’ paginate=‘yes’ template=‘template-in-the-theme-dir.php’]
[/tab]
[/tabs]

What template do I have to link if the posts shall look like the posts on Dazzling theme? I’m new to WordPress and php. Do I have to create a new template? If so, how do I have to code the template?

Thanks for your help
Lars

Hi Lars,

Yes you will have to develop some extra custom code to achieve this but it’s beyond the scope of support that we provide here as it’s custom work.

If you are not a programmer then you can consider hiring a developer from any online job board like https://www.elance.com/r/contractors/q-wordpress/ to develop it for you.

Cheers,
Movin

Hi Movin,

thanks for the support. Now it works fine for me.

You are most welcome here :slight_smile: