Inserting custom ads in mega menu

Posted in: Newspaper
Post count: 135

Hi
Trying to insert a custom ad spot into the mega menu. I know that it’s td_block_mega_menu.php that needs altering (we have a child theme) but I’m breaking the php file by adding shortcodes.
Can you illustrate where in the td_block_mega_menu.php file we’d call our shortcode
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);?>
Thanks
S

Post count: 22421

Hello Sejpost,
In order to modify the theme files you need to know a bit of php. Just adding the shortcode is not goiung to cut it this time. You have to change the code a bit and use $buffy .=

Add this code:
$buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');

here:
http://screencast.com/t/RpjhhiByvjoi
The result:
http://screencast.com/t/22LUCz3KP6s5

Thank you!

Post count: 135

You good sir are a total legend. This is sejpost’s designer posting on his behalf. CSS, HTML, jQuery I’m good with. PHP not so much – just the most basic basic stuff. So a big thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.