customization - Remove Category titles from individual posts on archive pages

admin2025-01-07  3

I would like to remove the category title or tag from my individual posts on my archive pages. I have already succeeded in removing the tags from the homepage and archive page header but they still show up on the individual posts (they are in a red font). So the posts always have the category "Latest Post" next to the actual headline, for instance. I am using the Newsliner theme if that helps. Thanks

I would like to remove the category title or tag from my individual posts on my archive pages. I have already succeeded in removing the tags from the homepage and archive page header but they still show up on the individual posts (they are in a red font). So the posts always have the category "Latest Post" next to the actual headline, for instance. I am using the Newsliner theme if that helps. Thanks

Share Improve this question asked Feb 22, 2020 at 18:04 Eric CurlEric Curl 1 2
  • please consider to ask the developers of the theme for help; wordpress.org/support/theme/newsliner – Michael Commented Feb 22, 2020 at 21:36
  • Contacting the theme developers is your best option. In the meantime you can use custom css and not display the css element you don't want to see. – Admiral Noisy Bottom Commented Feb 23, 2020 at 0:09
Add a comment  | 

2 Answers 2

Reset to default 1

To expand on my comment above and Dan's answer the following may help you.

Also see my previous answer for a similar question here: Prevent WordPress from giving each post a number

Steps for hiding a particular css element are reasonably simple.

  1. Load up one of the pages you want to modify in your browser, Chrome, Brave, Firefox etc.
  2. Right click on the archive title you want to remove and select "Inspect" to display information for the selected element.
  3. Identify the css element you wish to remove from the page and make a note of its identifier, for example archive-entry-title

Now log in to your Dashboard and select "Appearance" followed by "Customize".

You should see an option called "Additional CSS". This allows you to override specific css tags and make other changes to the css styles.

Add the following code and click "Publish" to remove the element you want hidden.

.archive-entry-title {display:none;}

Note the leading dot, it is important.

Refresh the page in your browser and confirm the result was what you expected.

This method is useful for modifying your theme without the need for editing style sheets or other files associated with your theme.

You can use this method to change other css elements as long as you correctly identify them beforehand. Mistakes are easily undone by removing your css additions.

Find the css selector and target it with display : none;

Alternatively, copy your themes archive.php template to your child theme and remove the template tags referencing the category and category title, then save.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736259829a619.html

最新回复(0)