• As we all know, WordPress has many “pages” that are not “fixed” or created in advance, but, are instead created on-the-fly based on something the user requested or clicked on.

    For example, when the user clicks on the name of a Category (e.g. “Lorem Ipsum”) a web page appears, that is a list of Posts associated with that category.

    Screenshot for illustration

    No problem, so far. Great feature! However, the customer told me, that in this view, they don’t want to see the list of Tags associated with the Post (e.g. on the first Post, you see “Porta, Vestibulum, Blandit Libero, Mollis”).

    I don’t know how to make it go away.

    So, somewhere WordPress is getting instructions to assemble pieces of data associated with Posts for the requested Category (in particular, the Tags for that category), then generating a web page that displays that data.

    I think my solution lies in finding the PHP files where those instructions are written, and modifying them, so that unwanted data does not display.

    The solution I’ve implemented right now, is set the element to not display when the BODY’s Class is “Category”.

    .category .tag-links {display:none;}

    Does anyone know how to go about doing this via PHP, or have a solution I haven’t thought of?

    Is there a reliable way to do this, so that my changes don’t get automatically overwritten, when I update my Theme to the latest version?

    Another thing the customer has asked for, in this view, is to display the Featured Image associated with the Post. Twenty Eleven doesn’t do this by default, as far as I know. Is there a good way to do this?

    • This topic was modified 1 year, 2 months ago by cvr2006.
    • This topic was modified 1 year, 2 months ago by cvr2006.
Viewing 1 replies (of 1 total)
  • Hi @cvr2006 ! Your css solution is valid, and will work reliably. If you want to make such changes in PHP code, the best way would be to create a child theme. Basically, your child theme will inherit most things from your current theme, and any templates that you put in the child theme will override the templates in your theme. Any updates to the main theme will not mess up your changes in the child theme. A plugin such as Child theme configurator can help with the process of creating and managing the child theme for you.

    In your particular instance, you can edit one or more of the following files to add/remove things like tags, categories, etc from your posts.

Viewing 1 replies (of 1 total)
  • The topic ‘Data In Lists of Posts: Customizable?’ is closed to new replies.