Ads on Lightbox


Hi, I was wondering how can I put and Ad Code on the right side of the lightbox, I don’t use comments so I got that blank space that I need to fill with something and nothing better than an ad.



You can use rtmedia_actions_before_description hook to show ads.


Hi Ritesh,

Sorry for my ignorance on this, but I’ve been messing around with the media-single.php file without results how do I hook it to the ad? where do I insert the code? as I said comment are disabled, And I found two times the hook across the file, could you tell me how to Insert the “Ad Code” on them or the proper way to do it.

Thanks and sorry for this.

<?php do_action('rtmedia_actions_before_description', rtmedia_id()) ;?>
<?php } else { // else for if ( $rt_ajax_request )?>
<?php do_action('rtmedia_actions_without_lightbox'); ?> <?php rtmedia_actions (); ?>
<?php do_action('rtmedia_actions_before_description', rtmedia_id()) ;?>


Hi Alejandro,
The code block inside if ( $rt_ajax_request ) is for single media light box view and the else part is for single media page view.
Just use the hook I gave you above and check whether is fulfills your requirement or not.
It will be called in both the places, on single media lightbox view and page view.