• I am using wp2.3 tagging system, but I dont want to create links for each tag. I just want a list of the tags to a post, without links. Is this possbile with the_tags()? If not, how can I manage to get the taglist without the links to each tag-page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Look at get_the_tags.

    Here’s the function wp-includes/category-template.php

    function get_the_tags( $id = 0 ) {
    	global $post;
    
     	$id = (int) $id;
    
    	if ( ! $id && ! in_the_loop() )
    		return false; // in-the-loop function
    
    	if ( !$id )
    		$id = (int) $post->ID;
    
    	$tags = get_object_term_cache($id, 'post_tag');
    	if ( false === $tags )
    		$tags = wp_get_object_terms($id, 'post_tag');
    
    	$tags = apply_filters( 'get_the_tags', $tags );
    	if ( empty( $tags ) )
    		return false;
    	return $tags;
    }

    Thread Starter jensos

    (@jensos)

    Hi MichaelH! Yes, this one give me a big array with the tags and much other stuff… how can I use PHP to get only a list of the tags?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘the_tags without links possible?’ is closed to new replies.