Forums

how can i avoid "Nothing found for Tag" messeage ? (12 posts)

  1. progvig
    Member
    Posted 1 year ago #

    i want remove this message from my blog
    example is :
    http://progvig.ir/tag/%D9%85%DA%A9%D8%A7%D9%86%DB%8C%DA%A9
    help me to do this
    tnk

  2. TM3909
    Member
    Posted 1 year ago #

    That is coming up because that tag does not exist within your WP Site.

    You can edit that message, depending on your theme, in the category-loop.php, the category.php or maybe even your archive.php.

    Look in those files and perform a text search (usually CTRL-F or COMMAND-F) for "nothing found for tag"

  3. progvig
    Member
    Posted 1 year ago #

    i looked but it isn't there and another themes too.
    because this message come from wp core.

  4. TM3909
    Member
    Posted 1 year ago #

    How is it coming from WP Core? Where did you track that down?

    I'm almost positive that it comes from your theme files.

  5. progvig
    Member
    Posted 1 year ago #

    ok ok,
    if isn't possible give me true code to avoid this message from title
    like 404 page

  6. TM3909
    Member
    Posted 1 year ago #

    The title is handled by the WP Header.php in your theme file.

    The title is assigned when your wordpress site hits that "tag not found" page. You could just do a custom title if you wanted to in the head, taking out the generated title, but that wouldn't be good for SEO.

  7. progvig
    Member
    Posted 1 year ago #

    i want
    how can i do this ?

  8. TM3909
    Member
    Posted 1 year ago #

    If you don't care about SEO, look for this (or something similar) in your header.php file:

    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
    
    	?></title>

    And replace it with:

    <title>This is my custom title</title>

  9. progvig
    Member
    Posted 1 year ago #

    in my site just tags has this problem
    JUST TAGS

  10. progvig
    Member
    Posted 1 year ago #

    like :
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    for post 404

  11. alchymyth
    The Sweeper
    Posted 1 year ago #

    what is the code in header.php of your theme, in the <title> tag?

    what happens if you deactivate your seo plugin?

  12. progvig
    Member
    Posted 1 year ago #

    nice idea
    thanks it's work!

Topic Closed

This topic has been closed to new replies.

About this Topic