WordPress.org

Forums

Customizr
add another php file (2 posts)

  1. hapke
    Member
    Posted 1 year ago #

    I would like to add a php file with my own shortcodes that already exists. How and where (which file) must I embed the code for shortcode.php?

  2. nikeo
    Member
    Theme Author

    Posted 1 year ago #

    Hi, you can simply copy your shortcodes.php file at the root of your theme files and use the following code in your functions.php file :

    <?php
    locate_template('shortcodes.php', $load = true, $require_once = true);
    ?>

    Hope this will help, cheers

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic