Target for Single/Archive Post Template?

This topic contains 1 reply, has 2 voices, and was last updated by  Sebastian 1 month ago.

Author Posts

bbq797

Is it possible to use Microthemer to style Single/Archive post templates? Or is it possible to style a single post and apply settings to all the posts? (using Gutenberg/Generateblocks). I know I can use post id’s to target individual posts but I have several posts. I’m wondering if it’s possible to target all of the posts at the same time.


Sebastian

Hopefully your theme already adds some useful classes to the body element for different types of page e.g. (Single/Archive), as well as post categories. But this isn’t guaranteed, so a link to an example page on your site will help us.

Assuming the classes are added by your theme, Microthemer will find them when suggesting selectors in the advanced targeting options. Search for them in the dropdown menus, which you can filter by typing the term you are searching for.

If your theme doesn’t add classes, you can do this by adding code to your child theme’s functions.php file, or by using a plugin. A quick search returned this plugin: https://wordpress.org/plugins/wp-custom-body-class/

Cheers,
Sebastian

You must login or register to reply to this topic.