Eco shortcode

Posted in: Newspaper
Post count: 80

Hello,

I am trying to add the following code after updating from 7.i to 7.7, but it doesn’t work.

<?php echo do_shortcode (‘[td_ad_box spot_id=”custom_ad_1″‘); ?>

It just shows on the page “[td_ad_box spot_id=”custom_ad_1”

Any ideas?

Post count: 23312

Hello Rony123456,

I have checked your code above and I noticed that it is not correct. You forgot the latest square bracket. Try the following code ->

<?php echo do_shortcode ('[td_ad_box spot_id="custom_ad_1"]'); ?>

Hope this helps and let us know how it goes!

Thanks for the message!

Post count: 80

I am adding it on loop-single-2.php but it gives a syntax error on line 39

View post on imgur.com

Post count: 1341

Note the quotation marks. In the PHP code should be:

<?php echo do_shortcode ('[td_ad_box spot_id="custom_ad_1"]'); ?>

  • This reply was modified 9 years by Edward.
  • This reply was modified 9 years by Edward.
Post count: 80

I am utterly confused right now. The code is implemented as shown, however the problem occurs again.

View post on imgur.com

View post on imgur.com

Post count: 23312

Hello Rony123456,

It seems that your shortcode is not good. try the code below and place it in the core files. The code is ->
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1" tdc_css=""]'); ?>
The result is here-> https://www.screencast.com/t/sT9WlnBla4d

Hope this helps and let us know how it goes!

Thanks for the message!

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