Alok Shenoy Alok Shenoy - 1 year ago 71
HTML Question

theme : twentyseventeen page template

I am using the twentyseventeen theme on my Wordpress installation. I've set an "About Me" as my static home page. I've created a "Blog" page which is set as the "Posts Page" using the "Customize" menus. The index.php of this theme (pastebin: http://pastebin.com/aap6j2A7) has been modified (lines 34-40) to filter out posts of a certain category (ID = 18) using

category__not_in => array(18)
.

I want the posts belonging to category ID 18 to appear on a separate page called "Custom Page". So, I've created a new page called "Custom Page" and also created a new template called "page-custom-page.php" with the same code as that shown in "index.php", except that between lines 34-40, I use the argument
"category__in" => array(18)
. This way I get only posts belonging to category ID 18.

The problem I'm facing is the the way the posts appear in the "Blog" page vs "Custom Page" are very different. The title of the posts on the "Custom Page" are differently styled. I'm unable to identify the cause for this. Shouldn't the fact that the code in index.php and "page-custom-page.php" are same result in the same styling of both pages?

TIA.

Answer Source

In twentyseventeen theme styles are added based on the body class function . for example

body.home h1 {
color :red;
}

this style works only in home page.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download