Show html only on the main-page

Hi, i wanted to put some content just after the logo but i didn’t saw any option to do it so i’ve decided to write the HTML5+CSS3 directly on the header.php inside the main-content-area div ( it looks perfect, as i needed ).

The question is: There’s any way to only show it only on the main page and not the others? Maybe a php if statement or something ( or just i’m doing so much work when there’s another easier way to acomplish it? ).

Thanks for your time.

Hi @ecag015,

I hope you are well today and thank you for your question.

You can use the following PHP if statement to achieve this.

if ( is_home() || is_front_page() ){?>
Add html code here
<?php }

Add your HTML code in place of “Add html code here” in the above code.

Best Regards,
Movin

Worked perfectly, thanks !!

You are most welcome here :slight_smile: