Site logo

Archived topic

Conditional Hooks

3 replies · Started by Bassie on May 13, 2018

Viewing posts 1–4 of 4

Hi

Thank you for your GREAT theme!

I am trying to get a template appear only on one single post (called '4 Qualities You Should Expect From Your Cleaning Service'

Can you please take a look on the php I added - can you spot my mistake?

<?php if ( is_single ( '4 Qualities You Should Expect From Your Cleaning Service' ) ) : ?>
[elementor-template id="446"]
<?php endif; ?>

I did as instructed, however instead of the actual template appearing on the site, it just says:

[elementor-template id="446"]

thank you

Bassie

Hi Bassie, try using this for your base code:

<?php if ( is_single( 'post slug' ) ) { 
    echo do_shortcode("[elementor-template id='XXXXX']");
} ?>

Thank you David!

Glad i could help!

This archived topic is closed to new replies.