WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode Exec PHP
Add code for widget titles (2 posts)

  1. NoahY
    Member
    Posted 2 years ago #

    Great plugin, five stars :)

    Can you add code for widget titles to shortcode-exec-php-class.php? This:

    add_filter('widget_title', 'do_shortcode');

    will allow using php in the titles as well, which allows things like turning off widgets under certain circumstances (by leaving both text and title blank).

    Thanks for your work :)

    http://wordpress.org/extend/plugins/shortcode-exec-php/

  2. Marcel Bokhorst
    Member
    Plugin Author

    Posted 2 years ago #

    It is not possible to execute a shortcode for a filter in this way, because there is no obvious way to pass the arguments of the filter to the shortcode.

    I am not sure the widget will be turned off by using an empty title and text. What about borders, etc that have been style by a theme?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic