WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] echo ngg tag title (4 posts)

  1. zbrass
    Member
    Posted 4 years ago #

    Hi
    When i place a ngg tagcloud in my post and i click a tag i get the pictures that are tagged with this word.
    No problem, works great.
    But i would like to title the result page with the tag i clicked.
    like with the archive.php and the wp tagcloud. single_tag_title

    Does anyone knows how to echo the tag title from the ngg tagcloud?

    Thanks

    Arthur

  2. zbrass
    Member
    Posted 4 years ago #

    Hi

    I found it

    <?php $gallerytag = (get_query_var('gallerytag')); ?>
    <?php echo $gallerytag; ?>

    Chears

    Arthur

  3. endolil
    Member
    Posted 3 years ago #

    Hey,
    thanks for the hint.
    I had the same issue and my final solution looks like this:

    $gallerytag = (get_query_var('gallerytag')); 		// get the slug
    			$gallerytag = str_replace("-", " ", $gallerytag); 	// replace dashes with spaces
    			$gallerytag = ucwords($gallerytag);					// capitalize words
    			echo '<h1>'.$gallerytag.'</h1>'; 					// show the result

    And I am happy with it! :)

  4. mr_swede
    Member
    Posted 3 years ago #

    Thanks guys for this. Works great!

    I'd like the tag_name and not the slug to be used. How do I do that?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.