Title: Add to theme files?
Last modified: August 31, 2016

---

# Add to theme files?

 *  [amanda blum](https://wordpress.org/support/users/howlingzoe/)
 * (@howlingzoe)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/add-to-theme-files/)
 * Hey, if we’d prefer to hard code into the theme files, how do you call the various
   shortcodes via php?
 * [https://wordpress.org/plugins/timed-content/](https://wordpress.org/plugins/timed-content/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [K. Tough](https://wordpress.org/support/users/kjvtough/)
 * (@kjvtough)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/add-to-theme-files/#post-7172153)
 * Other users have had success using the `do_shortcode` WordPress function to run
   Timed Content shortcodes in their themes.
 *  Thread Starter [amanda blum](https://wordpress.org/support/users/howlingzoe/)
 * (@howlingzoe)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/add-to-theme-files/#post-7172172)
 * 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](https://wordpress.org/support/users/howlingzoe/)
 * (@howlingzoe)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/add-to-theme-files/#post-7172176)
 * 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.

 * ![](https://ps.w.org/timed-content/assets/icon-256x256.png?rev=2953069)
 * [Timed Content](https://wordpress.org/plugins/timed-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timed-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timed-content/)
 * [Active Topics](https://wordpress.org/support/plugin/timed-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timed-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timed-content/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [amanda blum](https://wordpress.org/support/users/howlingzoe/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/add-to-theme-files/#post-7172176)
 * Status: not resolved