Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #295885

    Hello, i would like to add some shortcode to the Icon Box Title, im creating a little box that shows the logged in user / not logged in user.

    I have written a simple php script:

    		if ( is_user_logged_in() )
    			// Member is logged in, say hello.
    			global $current_user;
    			echo 'Hello, Commander ' . $current_user->display_name . '';
    			echo 'Hello, Commander';

    and i am then using the “Allow PHP in Post and Pages” plugin. I created a shortcode [php function=2] adding it to the main content area for the icon box works, but adding it to the title this does not work so well.. it just creates a shortcode mess:



    Open /config-templatebuilder/avia-shortcodes/iconbox.php and look for line 200:

    $output .= "            <h3 class='iconbox_content_title' $markup>".$title."</h3>";

    Replace it by this:

    $output .= "            <h3 class='iconbox_content_title' $markup>".do_shortcode($title)."</h3>";


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.