WordPress.org

Forums

Insert PHP
[resolved] How to get custom theme's directory? (2 posts)

  1. resting
    Member
    Posted 1 year ago #

    I tried
    [insert_php]echo get_stylesheet_directory_uri()[/insert_php]
    but it returns nothing.

    https://wordpress.org/plugins/insert-php/

  2. WillBontrager
    Member
    Plugin Author

    Posted 1 year ago #

    resting, the get_stylesheet_directory_uri() function isn't available at that point. PHP code within the [insert_php]...[/insert_php] tags needs to be complete within itself.

    If the PHP code runs on a web page by itself, it should run with Insert PHP. Otherwise, it won't.

    More info here:
    http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#inandofitself

    Will

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Insert PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic