Forums

[resolved] the_category() tag (9 posts)

  1. fatihturan
    Member
    Posted 3 years ago #

    Hello guys.

    How i can exclude a category when i use the_category(' '); tag?

  2. csleh
    Member
    Posted 3 years ago #

    have you tried
    'cat=-3'

    to exclude category 3 here

  3. fatihturan
    Member
    Posted 3 years ago #

    Yes. I tried it but it's doesn't work. Also there is no parameter like cat='' at this page.

    I'm waiting reply for alternative methods.

  4. fatihturan
    Member
    Posted 3 years ago #

    Hi again.

    I'm ressurecting this post but i can't find any solution. :/ Is anybody know any plug-in for this job or a solution?

  5. divauno
    Member
    Posted 3 years ago #

    There is a plugin called Advanced Category Excluder

  6. fatihturan
    Member
    Posted 3 years ago #

    Hello divauno.

    Thanks for your reply. But ACE plugin is not solved my problem.

    I just hide one category name from post information. Please look this screenshot: http://uploads.screenshot-program.com/upl7184110556.jpg

  7. chavo
    Member
    Posted 3 years ago #

    Hello.

    I'm looking same solution. Can you post how did you do it?

    Thanks in advance.

  8. Beee
    Member
    Posted 3 years ago #

    bump... also interested

  9. Beee
    Member
    Posted 3 years ago #

    and i found a solution. I wanted to display the links to the category a post is in (model name) except for 1 category, which has id 1.
    I never want to list that category.

    <?php
    	$category = get_the_category();
    	sort($category);
    	if ( in_category('1') )
    	{
    		echo '<h2><a href="/babes/' . $category[1]->slug .'" title="" />' . $category[1]->cat_name . '</a></h2>'; 
    
    	}
    	else
    	{
    		echo '<h2><a href="/babes/' . $category[0]->slug .'" title="" />' . $category[0]->cat_name . '</a></h2>';
    	}
    ?>

    enjoy

Topic Closed

This topic has been closed to new replies.

About this Topic