Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor K. Tough

    (@kjvtough)

    Other users have had success using the do_shortcode WordPress function to run Timed Content shortcodes in their themes.

    Thread Starter amanda blum

    (@howlingzoe)

    Could you give a code example of this? Since you have to open and close the shortcode its a bit confusing.

    Thread Starter amanda blum

    (@howlingzoe)

    So…. the rules work when used in the front end, no problem. In the themefiles… they don’t seem to want to work. Is this because the content I’m looking to hide is php rather than html output?

    <?php
    do_shortcode(‘[timed-content-rule id=”696″]’.get_template_part( ‘stuff’ ).'[/timed-content-rule]’);
    ?>

    have also tried <?php
    $result = get_template_part( ‘stuff’ );
    echo do_shortcode(‘[timed-content-rule id=”696″]’.implode(‘, ‘, $result).'[/timed-content-rule]’);
    ?>

    and
    <?php
    $result = get_template_part( ‘wdbreak’ );
    echo do_shortcode( ‘[timed-content-rule id=”696″]’ . $result . ‘[/timed-content-rule]’ );
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add to theme files?’ is closed to new replies.