Site logo

[Resolved] GP Hooks – adding conditional coding

Home Forums Support [Resolved] GP Hooks – adding conditional coding

Home Forums Support GP Hooks – adding conditional coding

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #172063
    Janet Davis

    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

    #172128
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #172204
    Janet Davis

    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

    #172224
    Tom
    Lead Developer
    Lead Developer

    Ah, in that case it would be this:


    Your front page content here

    #172300
    Janet Davis

    THANK You!
    Worked perfectly!
    Jan

    #172317
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.