//line 195
             $thelist .= '<a href="' . esc_url( get_category_link( 
         $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';

//exact php function       
     <?php the_category(); ?>

//output from inspector
<ul class="post-categories">
  <li><a href="/category/poker/" rel="category tag">poker</a></li>

im using twenty seventeen theme the problem is

everytime i post the exact function and when I inpect it in any browser it display css.how i remove those a tag?

Note: the output must be poker which is the category, line 195 is causing the problem

  • the_category() is specifically for outputting a link. Can you please provide more information about what you are wanting to display, and where you're trying to display it? Are you trying to show just the name of the category a post is in, on the individual post? – WebElaine Jan 31 at 17:37
  • what i mean is the function <?php the_category(); ?> suppose to display exact category name, so what is happening is displaying including the class – jayllopy Jan 31 at 17:45
  • It's built into the function. core.trac.wordpress.org/browser/tags/5.0.3/src/wp-includes/… You can use a different function to get just the info you need or build your own <ul> without a class manually. – WebElaine Jan 31 at 18:14
  • yeah i've read it, ill try my luck manipulating those code. – jayllopy Jan 31 at 18:25
  • @WebElaine having hard time finding what to delete in this code – jayllopy Feb 1 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.