Sticky Section Top Of Blog

Greetings,

First off, thank you for all your help yesterday. I’m not sure if you can answer this but thought I’d try. Is there any way to create a featured section for podcasts/youtube content stickied at the top of my blog feed? I would like it to be a different layout than a sticky post which shows the author’s name and category and such. I was thinking of creating a slider and perhaps customizing the functions.php, but wanted to get your thoughts if there is an option I am not aware of.

Thanks!

Update,

I am going to use a sticky post for now, you can ignore the question above. Was wondering if there is a CSS code to get rid of the dates of posts on the index/homepage feed only. Only not show that date on the on main page, so when they click into the post it will list it.

Thanks

Hello Thomas,

You need to add CSS code into X > Theme Options > CSS to hide the dates in the blog index. You need to use the Google Chrome Developer Toolbar to check the live HTML code and find which CSS selector you need to use.

By default, the body of the page for the blog index and archive pages uses blog and archive CSS class. The post meta is using .p-meta>span for each meta. Using the nth-child class selector, we can target the second meta by using; .p-meta>span:nth-child(2). Therefore the CSS code can be like this:

.blog .p-meta>span:nth-child(n),
.archive  .p-meta>span:nth-child(n) {
    display: none;
}

where n is equals to 2. This is to hide the second post meta element only for the blog index and archive pages.

Note: This code will not work. It serves as an example only. Change the “n” in the code to 2 to make it work.

Note: If you are unfamiliar with code and resolving potential conflicts, you may select our One or Care service for further assistance. We are unable to provide support for customizations under our Support Policy.

Best Regards.

Thanks! It worked in the Global CSS in the “Customize X in Theme options” instead of the “Additional CSS”, is there a reason for this? Just wondering for future reference.

Hi Thomas,

The CSS styling will be applied in hierarchical order. Other styles maybe overridden by other styling placed in different places. The following order of the styles are these:

  • Theme’s stack style (style.css)
  • Child theme’s style.css
  • WordPress Additional CSS (Appearance > Customize > Additional CSS)
  • X/Pro Theme Option settings
  • X/Pro Theme Option’s Custom CSS
  • Cornerstone/Pro Editor’s Page Custom CSS

That is why when you add the code in the “Additional CSS”, it does not work because a setting in the Theme Options or Custom CSS has overridden it.

Hope this explains it briefly.

Sounds good thanks!

Hi Thomas,

You are welcome, please let us know how it works for you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.