Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

How do I remove date from front page, post pages?


 
Prev Previous Post   Next Post Next
  #1  
Old Aug 31, 2014, 04:41 PM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
How do I remove date from front page, post pages?

Hello BytesForAll Forum!

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 {
    
displaynone;
}

// 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;

I can find only one date remover plugin. It does not work. It removes the date from the front page but leaves spaces and an apostrophe. It does not work at all on the post pages.

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
Thanks in advance.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove date above page title 86owen Center area post/pages 9 Aug 22, 2014 03:01 AM
Remove date on pages and posts letsfigurethisout Montezuma Theme 13 Mar 10, 2013 06:21 PM
How to Remove Post date from Main page and Single Page? techyleakz Montezuma Theme 2 Mar 6, 2013 11:30 AM
[SOLVED] How do I remove dashboard and edit post links from public view on front WP p epicworld17 Forum How-To 2 Jan 23, 2012 04:05 PM
PATCH 373-03: date-modified in post/page info items returns the date published juggledad Old Version fixes and change logs 0 Dec 30, 2011 06:41 PM


All times are GMT -6. The time now is 08:05 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.