Positioning ads between posts in category view?

Home Forums Calendar Products Events Calendar PRO Positioning ads between posts in category view?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1132630
    tribedude
    Participant

    I would like to put an ad slot in between posts in the category event lists (see my screen cap with the red arrow pointing to the spot). How can I do this?

    Also, how can I put an ad slot at the event of each event in single post view?

    I have been trying to do this with the hooks provided in my wordpress theme and it is not working. Is there another way to do it? I hape to inject some DFP served ads into those positions.

    Thank you.

    #1132682
    Josh
    Participant

    Hey Alex,

    Thanks for reaching out to us!

    There are a couple of ways that you could go about accomplishing this.

    The first would be to utilize the hooks in the calendar views to output your ad code. For this you could use the “tribe_events_after_the_content” hook for the list view and the “tribe_events_single_event_after_the_meta” for the single view.

    Secondly, you could follow our Themer’s Guide to copy the single-event.php file and list > single-event.php files into your theme and include the ad code wherever you would like into those templates.

    Let me know if this helps.

    Thanks!

    #1132696
    tribedude
    Participant

    The first would be to utilize the hooks in the calendar views to output your ad code. For this you could use the “tribe_events_after_the_content” hook for the list view and the “tribe_events_single_event_after_the_meta” for the single view.

    This is what I would like to do, but where can I find these hooks? I have something called “hook content” in my theme, which allows me to position ad slots in various places but the hooks you mention aren’t available as selections for me…

    #1132920
    tribedude
    Participant

    I am not an engineer and my php knowledge is limited.

    Is there a way to access the events calendar hooks from within my wordpress dashboard to put ads in that way?

    #1133394
    Josh
    Participant

    Hey Alex,

    Thanks for following up here.

    There would be a way to access the hooks within your WordPress dashboard. These hooks are intended to be used in a code context to add additional code in particular locations.

    To utilize this particular hook, you would add the following code (updated with the custom code you’d like to add) to your theme’s functions.php file

    
    add_action( 'tribe_events_single_event_after_the_meta', 'tribe_events_after_content_ad' );
    function tribe_events_after_content_ad() { ?>
    
    //add your ad code here
    <?php
    
    }
    

    Let me know if this helps.

    Thanks!

    #1139719
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Positioning ads between posts in category view?’ is closed to new replies.