Site logo

Archived topic

GP Hooks - adding conditional coding

5 replies · Started by Janet Davis on February 11, 2016

Viewing posts 1–6 of 6

Hello Tom,

Is there a way to add a conditional coding to the Inside Content Container but only on the home page which is a Static page with posts?

And does google pick this up as page content?

I want to have all my blog posts on the home page, but I also want to have content at the top of the page. Maybe there is an easier way to do it.
Thank you

Jan Haveron
amorphousacres.com

Absolutely, you can wrap it in this conditional:

<?php if ( is_front_page() ) : ?>
    Your front page content here
<?php endif; ?>

Then check the "Execute PHP" option.

Google will definitely pick it up as content :)

Tom,
Thank you but it didn't work.
I have the home page set as a A static page - Posts page: home.
I tried blog_page, blog, home, but couldn't figure out what this page was called.
Could you please assist me further.

Thank You
Jan

Ah, in that case it would be this:


Your front page content here

THANK You!
Worked perfectly!
Jan

You're welcome :)

This archived topic is closed to new replies.