How to Hide Date Based on Specified Page’s Title in iNove Theme of WordPress

Have you ever wanted to hide the created date that displayed in a specified page based on its title page on your WordPress blog? For example, you used a page with permalink forum and its title page is Forum whereas the content of its page derived from the certain plugin that adding the Discussion Forum on your WordPress blog. Well, here is the solution how you can hide that date on the page.

Open your \wp-content\themes\inove\page.php file, and find this code:

8
			<span class="date"><?php the_modified_time(__('F jS, Y', 'inove')); ?></span>

then replace with this following code:

8
9
10
11
12
13
14
15
		<?php $title = get_the_title(); ?>
		<?php if ($title == 'Forum') { ?>
 
		<?php } else { ?>
 
			<span class="date"><?php the_modified_time(__('F jS, Y', 'inove')); ?></span>
 
		<?php } ?>

If you want to add more than one page, then adjust this code:

9
		<?php if ($title == 'Forum') { ?>

become:

9
		<?php if (($title == 'Forum') || ($title == 'Your Another Page Title')) { ?>

Hope it helps you.

Share

485 viewsPrint This Post Print This Post

Speak Your Mind

*


*