Question 1: How do I remove the date from the front page and the post page?
Question 2: Could I use a child theme to remove the dates?
Here is the URL:
http://www.artantiquebroker.com/
I have got a couple of hacks that I put in the Edit CSS file. But I want to figure a better, more permanent fix. The display: none works okay for the front page. But whiting out the date on the post page is not a very good fix.
I might could figure out how to write a plugin but I was wondering if there might be an easier way to solve my problem?
PHP Code:
// Removes the date from the front page
div.post-date {
display: none;
}
// Whites out the date on the post pages but the spaces are still there.
// I worry that this could also white out the category and tag links in some browsers.
div.post-footer {
color: #FFFFFF;
}
Non-functional date remover plugin:
PHP Code:
<?php
/*
Plugin Name: WP Date Remover
Plugin URI: http://internetmarketinglab.net/internet-marketing-tools/wordpress-wp-post-date-remover
Description: (Wrong. Partly removes date from front page, does nothing for a post page. pn) This is a wordpress plugin that removes or hide date of a particular post or page in your wordpress blog.
Author: X Omar. (Nope. Doesn't work.)
Version: 1.0
Author URI: http://internetmarketinglab.net
*/
//remove date from
$locations = array('is_home','is_single','is_page');
//date functions used in your template
$date_functions = array('the_date', 'the_time','get_the_date', 'get_the_time');
//call date remover on loop start wordpress action
add_action('loop_start', 'date_remover');
//main date remover function
function date_remover()
{
global $locations, $date_functions;
foreach($locations as $location)
{
if(function_exists($location))
{
remove_date($date_functions);
}
}
}
//remove date function
function remove_date($date_functions)
{
foreach ($date_functions as $date_function)
{
add_filter($date_function, 'erase_date');
}
}
//erase function
function erase_date(){}
#END OF PHP FILE
