[Resolved] How can i turn off gp-hooks for the homepage?

Home Forums Support [Resolved] How can i turn off gp-hooks for the homepage?

Home Forums Support How can i turn off gp-hooks for the homepage?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #584312
    George

    Hey!

    I want to find a way to turn off “After Entry Title” gp-hook (which contains Lightweight Social icons shortcode) for the homepage. Homepage is set to display my latest posts. And because of this i can’t find page id for it.

    <?php if ( ! is_page( [???, 27] ) ) : ?>
          [widget id="lsi_widget-2"]
    <?php endif; ?>

    ??? – where the homepage id should go, but i can’t find it.
    27 – is my about page

    How can i solve this? And is there any other ways to make it work?

    #584328
    David
    Staff
    Customer Support
    #584349
    George

    Thanks! Almost there πŸ˜‰

    But what if i want to combine them? I mean, i want to turn off the hook on my homepage AND also on my about page.

    #584356
    David
    Staff
    Customer Support

    You can try:

    <?php if ( ! is_home() && ! is_page( 27 ) ) : ?>
        Content here  
    <?php endif; ?>
    #584368
    George

    Thanks, David! You rock πŸ˜€

    #584376
    David
    Staff
    Customer Support

    You’re welcome George, glad you got it fixed

    #586878
    George

    Hey, i know this is a bit off-topic (and late), but i wanted to ask where i can learn more about these tags? Like is_home and is_page. I’m not particularly tech savvy, so i would appreciate something for total newbs πŸ˜€

    Also, is there a tag for search page results? Like is_search or something?

    #586903
    George
    <?php if ( ! is_home() && ! is_page( 27 ) && ! is_search() ) : ?>
         
    <?php endif; ?>

    Ok, this seems to work fine πŸ˜€

    #586943
    David
    Staff
    Customer Support

    Hi George, you can learn more of the WP conditional tags here:

    https://codex.wordpress.org/Conditional_Tags

    #587041
    George

    Thanks, David!

    I think it’s time for me to learn some php πŸ˜€

    #587045
    David
    Staff
    Customer Support

    You’re welcome – have fun lol

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