[Support request] Having a problem with hooks

Home Forums Support [Support request] Having a problem with hooks

Home Forums Support Having a problem with hooks

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #266288
    Daniel

    I’m trying to add some html before the header.
    For some reason, it won’t run. My page is called news

    <?php if ( is_page( ‘news’ ) ) : ?>
    <h1 style=”color:black;”>Hello</h1>
    <?php endif; ?>

    #266337
    Leo
    Staff
    Customer Support

    Hi Daniel,

    Can you make sure that the “Execute PHP” checkbox is checked?

    #266416
    Tom
    Lead Developer
    Lead Developer

    Also make sure news is the slug: yourwebsite.com/news

    #266449
    Daniel

    The slug is news and in settings/reading news is set as the blog page.
    This is not working for me. If I change the php to ‘about’ for the about page it works and if I remove the php and just put <h1 style=”color:black;”>Hello</h1> it works for the news page.
    Yes, I do have execute php enabled.
    Something is not right 🙁

    #266561
    Leo
    Staff
    Customer Support

    Can you try to replace is_page( ‘news’ ) with is_home()?

    Let me know.

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