Skip to:
Content
Pages
Categories
Search
Top
Bottom

Function to Display Topic Tags in bp-1.3 not working for me.

  • @bigjimmysisco

    Member

    I have been wanting to display the tags in my topic for the longest time in the world, and when I finally think I have it, of coarse, I don’t.

    I put this in my bp-custom.php file:

    `function bp_forum_topic_tag_list_1() {
    echo bp_get_forum_topic_tag_list_1();
    }
    /**
    * Get the current topic’s tag list
    *
    * @package BuddyPress
    * @since 1.3
    *
    * @param str $format ‘string’ returns comma-separated string; otherwise returns array
    * @return mixed $tags
    */
    function bp_get_forum_topic_tag_list_1( $format = ‘string’ ) {
    global $topic_template;

    $tags_data = !empty( $topic_template->topic_tags ) ? $topic_template->topic_tags : false;

    $tags = array();

    if ( $tags_data ) {
    foreach( $tags_data as $tag_data ) {
    $tags[] = $tag_data->name;
    }
    }

    if ( ‘string’ == $format )
    $tags = implode( ‘, ‘, $tags );

    return apply_filters( ‘bp_forum_topic_tag_list_1’, $tags, $format );
    }`

    And I call the function in the topic, but no tags appear no matter what.

    What is wrong!?

  • The topic ‘Function to Display Topic Tags in bp-1.3 not working for me.’ is closed to new replies.
Skip to toolbar