[Resolved] How to insert Taboola ads in-between content and comment?

Home Forums Support [Resolved] How to insert Taboola ads in-between content and comment?

Home Forums Support How to insert Taboola ads in-between content and comment?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #634600
    Jericho

    Hi GP Team,

    Is there a way to insert Taboola/MGID ads in-between content and comment? Currently, I’m using the After Content Hooks which makes the ads appears just before the category and tags.

    I would like to insert the ads in-between content and comment section.

    See this screenshot: https://prnt.sc/kc3qm3

    Thanks!

    #634609
    David
    Staff
    Customer Support

    Hi there,

    Try the generate_before_comments_container hook.

    Leo’s visual guide is really handy:

    https://docs.generatepress.com/article/hooks-visual-guide/

    GP 1.7 will make this super easy. In the meantime you will need to do this:

    https://docs.generatepress.com/article/using-hooks/

    #634624
    Jericho

    Hi David,

    My apology. Not sure if I do it correctly. I’m not really techy. ๐Ÿ™‚

    add_action( 'generate_before_comments_container','example_function_name' );  
    function example_function_name() { ?> 
        MGID CODE HERE
    <?php }

    What should I put on example_function_name and where should I paste the code in GP Hooks -> After Content?

    Thanks!

    #634632
    David
    Staff
    Customer Support

    Hi there,

    you would need to add the code to your child theme function file, if you’re not using one then the Code Snippets plugin will make that possible. Link to that plugin is in here:

    https://docs.generatepress.com/article/adding-php/

    The function name is whatever you want it to be – make it something meaningful eg.:

    add_action( 'generate_before_comments_container','jericho_before_comments_ads' );  
    function jericho_before_comments_ads() { ?> 
        MGID CODE HERE
    <?php }
    #634653
    Jericho

    Got it! Thanks, David!

    When is the expected release date of GP 1.7?

    #634660
    David
    Staff
    Customer Support

    Thats great!
    1.7 is currently in Release Candidate so it should be very soon ๐Ÿ™‚ Maybe within a week.

    #634669
    Jericho

    Awesome! We’ll with for that.

    Thanks again!

    #634759
    David
    Staff
    Customer Support

    Glad to be of help

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