35,10,0,50,1
25,600,60,0,3000,5000,25,800
90,150,1,50,12,30,50,1,70,12,1,50,1,1,1,5000
0,2,1,0,2,40,15,5,2,1,0,20,0,1
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com...
welcome to wplecturer.com...
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com

How do you use an if/else statement with the_category (categories, WordPress)?

More
1 month 2 weeks ago #2224 by ekatsa
How do you use an if/else statement with the_category (categories, WordPress)?

Please Log in to join the conversation.

More
1 month 2 weeks ago - 1 month 2 weeks ago #2225 by ekatsa
use is_category()   see
 is_category() | Function | WordPress Developer Resources

 Determines whether the query is for an existing category archive page.

  developer.wordpress.org/reference/functions/is_category/

 also see

 Constructing An if Statement with is_category(); in archive.php (WordPress)
 I am trying to use an if statement with is_category() in order to build a bigger piece of code later. I can't get the code to recognize the if statement though. Basically below I've posted the coding
  stackoverflow.com/questions/11659177/con...rchive-php-wordpress
  • if(is_category()) { 
  • echo "category!"; 
also see
the_category if/else statementI need to do the following: The sense if I have a class dportfolio - show a category dportfolio. Otherwise show usual category. I use: if ( class_exists( 'DPortfolio' ) ) { echo DPortfolio::

wordpress.stackexchange.com/questions/16...ry-if-else-statement


I need to do the following: The sense if I have a class dportfolio - show a category dportfolio. Otherwise show usual category.I use: 
  • if ( class_exists( 'DPortfolio' ) ) { 
  • echo DPortfolio::instance()->dportfolio_get_category(); 
  • }; ?> 
Last edit: 1 month 2 weeks ago by ekatsa.

Please Log in to join the conversation.

Time to create page: 0.230 seconds