Site logo

Archived topic

Blog Page Configurations

11 replies · Started by fabiosilva on July 9, 2019

Viewing posts 1–12 of 12

Hi,
I've created a Blog Page and I need to add some static information before (for example title, text, etc).
At the same time, I need to hide sidebar on blog page.

So, I tried make this changes on page defined to "blog", but nothing happens on the front end.

Am I doing something wrong?

Thank you.

Hi there,

I need to add some static information before (for example title, text, etc).

Not exactly sure what you are trying to create but you could consider using a header element:
https://docs.generatepress.com/article/page-hero-examples/
https://docs.generatepress.com/article/how-to-create-a-page-hero/
https://docs.generatepress.com/article/header-element-overview/

Or a hook element:
https://docs.generatepress.com/article/hooks-element-overview/
https://docs.generatepress.com/article/hooks-visual-guide/

As for blog page sidebar layout, it can be set in the customizer as WordPress ignores all metabox by default on index pages:
https://docs.generatepress.com/article/sidebar-layout/#blog-sidebar-layout

Let me know if this helps :)

Hi,
Please, I need to customize the css tags "entry-xxx", regardless on blog page and post page. Any css recommended to do it?

Thank you.
Fábio

Not quite sure if I fully understand.

What are you trying to achieve?

Basically, I try customize the elements of blog page and article page (for example, title, date, author, excerpt etc). With different customizations on blog and article page.

Titles on the posts listing page are <h2> and can be modified in the customizer.

Titles on single posts are <h1> and can be modified in the customizer as well.

The entry meta (author and date) can be modified using this CSS:

.entry-meta {
    color: #000;
    font-size: 15px;
}

Then excerpt can be modified using this CSS:

.entry-summary {
    color: #000;
    font-size: 15px;
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Let me know if this helps :)

Hi,
Thank you for your help.

But, for example, I desire customize the .entry-meta of blog page, and .entry-meta of post page. So, with different customizations. And the CSS tags are the same.

I think I am being clear. :-s

Thank you

Hi there,

keep Leos code he provided this will apply to blog and all archvives.
Underneath that CSS create an exact copy of it, and change the selectors to .single-post .entry-meta and .single-post .entry-summary respectively. This will then set those styles for the single post.

Hi,

Thank you for your help. I think I can solve my problem.

Btw, it's possible put the date (entry-meta) below image?
https://ibb.co/m50dC5P

Thank you

This might help:

add_action( 'after_setup_theme', function() {
    remove_action( 'generate_after_entry_title', 'generate_post_meta' );
    add_action( 'generate_after_entry_header', 'generate_post_meta', 15 );
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know :)

Solved! :-)

Thank you.

You're welcome :)

This archived topic is closed to new replies.