[Resolved] Not display hook in sidebar

Home Forums Support Not display hook in sidebar

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1438320
    Eric

    Hi,
    I make a hook to display a sharing article option.

    function rezo_add_to_content( $content ) {
    if( is_single() && ! empty( $GLOBALS[‘post’] ) ) {
    if ( $GLOBALS[‘post’]->ID == get_the_ID() ) {
    $content .= ‘all the content goes here’;
    }
    }
    return $content;
    }
    add_filter( ‘the_content’, ‘rezo_add_to_content’ );

    I works but it appears as well in the sidebar within a views I made with Toolset. How Cani I avoid it ?
    Thanks for your help

    #1438327
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I fully understand.

    Any chance you can link us to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know 🙂

    #1438571
    Eric

    Look the sidebar 😉

    #1438787
    Leo
    Staff
    Customer Support

    Sorry what am I looking at in the sidebar?

    I’m seeing 5 sidebar widgets:
    https://postimg.cc/4YF56Z51

    #1438866
    Eric

    Hi,
    In the sidebar there’s a widget with Toolset views : “Articles Récents” with a pink title and you see that it repeats my hook at each post : “Partagez cet article“.
    I want that this hook appears only at the end of the article and don’t appear in the widget.

    #1439175
    Eric

    Hi,
    I discover the power of “Elements” and it works now.
    I close this topic
    Have a good day !

    #1439528
    Leo
    Staff
    Customer Support
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.