Copy Blog Layout

Hello,

There is one blog template from a demo that I’d like to copy for another site. Could you please explain me where I can find the code or the settings that I should copy?

The blog is this one: https://modeles.neowebsite.io/site-internet-agence/actualites/

Thanks,
Antoine

Hi Antoine,

To copy that page, you need to select ETHOS Stack then create a blog page and set as your posts page under Settings > Reading

For the post slider, you can enable it under Theme Options > Ethos. Kindly refer to the link below for more information

Thanks

Thank you for the explanation.

I still have four questions:

  1. How can I apply CSS to the blog page only? I need to change a few things as it currently doesn’t display correctly.
  2. Is it possible to display only articles from a few categories or from a few types?
  3. How to I manage to get fullwidth article image as I can see on the demo?
  4. Is is possible to display categories and subcategories in the navbar? I mean in a way that the user notice which ones are categories and which ones are subcategories? You can notice it in the WP admin, but they are all displayed at the same level in the sidebar.

URL: https://neowebsite.io/blog/

Hello @Lecoqdigital,

Thanks for updating the thread. :slight_smile:

To write CSS only for blog index page then you need to prefix .blog class before the relevant CSS classes. For single blog posts please prefix .single-post class. For ex:

Main blog index page CSS:

.blog h2.entry-title {
    font-size: 200%;
}

Single blog post CSS:

.single-post h1.entry-title {
    font-size: 300%;
}

Under X > Theme Options > Ethos > Blog Options toggle Filterable Index and enter the relevant Category id.

Edit the post and under Ethos Post Settings and select Index Featured Post Layout.

You can take a look at following resources.

Thanks.

Thank you very much for the detailed answer.

When using the widget “Category”, is it possible to select which categories which be displayed using a list a IDs (or something similar)?

Hi,

You can try this third party plugin.

Hope that helps

Thank you. It should do the job.

I’ve selected a date format in WP admin, but it doesn’t apply in the blog. Why and how can I change it?


Hi @Lecoqdigital,

The format is hard coded within the template, and it overrides the setting applied to that area. To override it again, please add this code to your child theme’s functions.php

function follow_the_system_date_format( $the_date, $d, $post ) {

	return get_post_time( get_option( 'date_format' ), false, $post, true );

}
add_action( 'get_the_date', 'follow_the_system_date_format', 999999999, 3 );

It will then forcefully follow the format that you add in that setting.

Hope this helps.

Thanks!

Thank you!

You’re welcome.

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