WordPress.org

Forums

PHP for taxonomy title with number (1 post)

  1. lifesgood
    Member
    Posted 12 months ago #

    A big thank you in advance to anyone who may be able to help me with this...

    I have a custom post type called RESOURCES which I used to create a directory of resources on my website. This CPT has the taxonomy called PRICES (and the terms for each post are free, free trial, premium).

    So, when someone's viewing my directory and they see in the sidebar PRICES with those options underneath, they could click on (for example) FREE and see 18 different free resources listed.

    What I want is for that FREE page (mysite.com/price/free) to have the headline "18 free resources" instead of just "Free"

    What PHP do I use to display that? I am assuming there are three parts: First: the number, Second: the taxonomy term and Third: text that simply reads "resources" at the end.

    My knowledge of PHP is limited, but I have been able to work it out enough to do other things such as showing author names where I want them to etc. I just need the php - I know where to put it etc.

Reply

You must log in to post.

About this Topic