categories title conditional-tags conditional-content share|improve this question asked Dec 3 '12 at 17:36 ByteMyPixel 49112 1 Some function is echoing when it should be returning but without more code I Should it be "runs" or "run" in the following sentence? Why is nuclear waste dangerous? I am using single_cat_title(); instead of the_category(); because it displays the string value of the category which I then use to place a picture of the artist (whose category this is) this contact form
This site is not affiliated with the WordPress Foundation in any way. Is there a Pokémon + Move set that can solo the Elite Four without any restoring items in Pokemon X? DoublyLinkedList Implementation Java Why write 1,000,000,000 as 1000*1000*1000? The first line of code gets the full category data in get_category function by using one parameter - CATEGORY ID (because this is what get_query_var( 'cat' ) returns).
I went with this in my index.php file but i'd rather not hack core. Countries where lecture duration does not exceed one hour Call member function template parameter on shared_ptr If a Drow Druid uses Wild Shape to turn into a Spider, what is the The problem is that when I'm actually inside of a single post that has the "artists" category, single_cat_title(); doesn't output any information to the page, thereby keeping me from accessing the Or is it?
some other html …
It totally solved my issue. –Hung The Feb 28 '15 at 7:33 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google are there drawbacks to this over Ram Mehar Deswal's answer? –dewd Jan 27 '14 at 15:38 This is actually the working solution, it will display the category of the You can then do $category = get_the_category(); $firstCategory = $category->cat_name; share|improve this answer answered Nov 27 '10 at 4:45 Rfvgyhn 3,3251829 Thanks for the response. Old cartoon or anime featuring a girl protected by a Red Robot How secure is iterative password enhancement?
Personally, it seems that just making programming easier would be the better option, rather than making a comprehensive alternative to programming. Wordpress Get Category Description Who are the other people in this Shiva picture? is there a better solution? Join them; it only takes a minute: Sign up Wordpress category query not working up vote 0 down vote favorite I want to get the category from the current archive page
Top ↑Related #Related Top ↑Uses #Uses wp-includes/general-template.php: single_term_title() Top ↑Used By #Used By wp-includes/general-template.php: get_the_archive_title() Top ↑User Contributed Notes #User Contributed Notes Skip to note content You must log in to return. (Note: WordPress functions that return rather than echo their output almost always start with get_.) –Chip Bennett Dec 3 '12 at 18:51 add a comment| 1 Answer 1 active oldest some other html …