WordPress.org

Support

Support » Themes and Templates » Creating own shortcode to get_template_part ?

Creating own shortcode to get_template_part ?

  • I want to define my own shortcode in Functions .php, and I want it to get a .php file from the theme.

    I’ve created a map.php, and want the shortcode [map] to pull it in where ever. It doesn’t have to have a button on TinyMCE or anything. Just to work when I type it in.

    I’ve found a plugin which lets you create your own shortcodes and use them to return text, but I doubt it’ll let me use php. Although I might just need to return html actually.

    I’ll have a think x)

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating own shortcode to get_template_part ?’ is closed to new replies.
Skip to toolbar