How to remove WordPress blog dates, authors in all or certain categories –

We recently released an update to the integrated WordPress blog (New Year and New Ultimate Web Builder Software Upgrade 6.4) to make it easier to to not show blog dates and authors for posts in all or certain categories. No third-party plugin install required!

Step 1) Switch your WordPress theme: Activate the “uwb2” theme.

Login to your WordPress admin panel, and navigate to Appearance > Themes.

The available WordPress themes are displayed. Select the “uwb2” theme. If you do not find it here, it means that you have not uploaded the new theme to your blogs folder. After downloading the new UltimateWB Full upgrade files, it will be under the “blog_sample” folder > wp-content > themes > uwb2.

And mouse over the uwb2 theme to click on the “Activate” button:

You will get a confirmation message when activated:

Step 2) File editing if you need further customization…

If you want to not show the post date / author for all posts outside of the “Announcements” category, you’re done! If you want to customize this further, read on for the instructions…

Login to your web hosting account (cPanel if you’re hosting with UltimateWB). Double-click on the File Manager icon to open it, and navigate to your blog folder / wp-content / themes / uwb2.

Three WordPress files are involved in the display of the post dates and authors:

wp-content/themes/uwb2/loop.php
wp-content/themes/uwb2/loop-single.php
wp-content/themes/uwb2/loop-attachment.php

You can find the section in each of these page where the clause has been added to omit the date/author of the post if it’s in the Announcements category by searching (CTRL-f) for the following term:

if (in_category(‘Announcements’

What this phrase means is that if the post is in the Announcements category, continue with the rest of this code block. So, if you would like to add more categories that would make the statement true, you can add more clauses, i.e.:

if (in_category(‘Announcements’) || in_category(‘Category 2’)

The final coding for this section woul look something like:

f (in_category(‘Announcements’) || in_category(‘Category 2’) || in_category(‘Category 3’))

vs

if (in_category(‘Announcements’))

The || means “or”. Note you can use category names or category id numbers, useful if you might be changing category names.

There are 2 instances of this on the loop.php file, and one instance in the loop-single.php file, and the loop-attachment.php file.

You can check out this customization in action:

UltimateWB blog (our blog!)

Me We Too blog

Shout Out Universe blog

Enjoy customizing!

This entry was posted in WordPress Customization and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *