Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #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;
         			get_currentuserinfo();
    			echo 'Hello, Commander ' . $current_user->display_name . '';
    		}
    		else
    		{
    			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:

    #296527

    Hi,

    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>";
    

    Regards,
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.