Tagged: ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #194466

    Hi there,

    I was just searching for ways to insert a post’s tags into an iconbox but seem to have no way around it. I’ve attempted to input shortcodes as an alternative with a suggestion using “Insert PHP” plugin, but it didn’t really work.

    So I would like to ask if there is some way I can work around to get the tags displaying, with clickable links of it to like an auto-search page based on the tags?

    Thanks!

    Regards,
    Robert Chai

    #194520

    Hey sgrobert!

    What ‘tags’ do you want to show? you could create a custom shortcode to embed them, try adding this to the functions.php file:

    function custom_shortcode() {
    	return get_the_tags();
    }
    add_shortcode( 'my_custom_tags', 'custom_shortcode' );
    

    Best regards,
    Josue

    #194582

    Hi Josue,

    I’m enquiring to display the Portfolio-tags or Post-tags, to retrieve them for display when a portfolio item or post loads into view. Given this, is there a way to retrieve the tags through the advanced editor? As apparently any form of shortcode insertion seem to not work or break the theme, while inserting the code within the advanced editor instead of the default one?

    I was hoping of using this method as going through the original code and editing it is really not the ideal way as I’ve paid for the theme in hopes to make my life simpler. Thanks.

    Regards,
    Robert Chai

    #194587

    Hey!

    The tags you want to retrieve are the ones of the current Post/Portfolio?, the code i provided is meant to be put in the functions.php file, after that you can use [my_custom_tags] to invoke it.

    Best regards,
    Josue

    #194598

    Hi Josue,

    I’ve just tried your method, but apparently it displays an “Array” text. May I know how to break it part to show like “Tags: Shirts, Red” something like that?

    Thanks.

    Regards,
    Robert Chai

    #194605

    Hey!

    I will make some tests locally and keep you updated :)

    Regards,
    Josue

    #194609

    Hi Josue,

    Thanks! Looking forward to the updates.

    Regards,
    Robert Chai

    #194698

    Hey!

    I think you just need to use another function – try following colde instead which uses the get_the_tag_list function: http://codex.wordpress.org/Function_Reference/get_the_tag_list

    
    function custom_shortcode() {
    	return get_the_tag_list('<p>Tags: ',', ','</p>');
    }
    add_shortcode( 'my_custom_tags', 'custom_shortcode' );
    

    Cheers!
    Peter

    #194712
    This reply has been marked as private.
    #195215

    Hi!

    The syntax of the code I posted above seems to be valid for me but try to remove the p tag – maybe it’s not supported by the “Insert php” plugin:

    
    function custom_shortcode() {
    	return get_the_tag_list('Tags: ',', ','');
    }
    add_shortcode( 'my_custom_tags', 'custom_shortcode' );
    

    Best regards,
    Peter

    #195390

    Hi Dude,

    I actually went on to search another plugin called “Allow PHP in Posts” and it works smoothly for me instead. Thanks for helping! ;)

    Regards,
    Robert Chai

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Displaying Tags in IconBox?’ is closed to new replies.