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?


  #1  
Old Aug 31, 2014, 04:41 PM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
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.
  #2  
Old Aug 31, 2014, 07:45 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
edit the sub template 'postformat.php'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Sep 1, 2014, 07:57 AM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
Editing the postformat.php sub-template only removes the date from the front page. I already figured out how to do that.

This css snippet in the Edit CSS section removes the date from the front page.
div.post-date {
display: none;
}

You can't edit the date on the post pages from the postformat.php page.

I am trying to figure out a permanent fix so I don't lost all my changes when the theme updates.
  #4  
Old Sep 1, 2014, 09:04 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
single post pages use the 'single.php' template
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Sep 1, 2014, 09:37 AM
JimTrail's Avatar
JimTrail
 
59 posts · Sep 2010
Knoxville, Tennessee
Juggledad;

Thanks for the help.

I updated to the latest version of the Montezuma theme the other day. I had forgotten but I had made a list of changes that I made to the previous version.

What I have got is a text file where I am making a list of the changes so when I update I can remind myself.

That is probably the best way to do what I need rather than try to figure out how to write a plugin.

Thanks again.
  #6  
Old Sep 1, 2014, 10:30 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
doing an update shouldn't change any theme option changes you made. If you go in and change the theme code - yes it will wipe them out, but changing a virtual template (like the single.php virtual template) will not be effected by a theme upgrade.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

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 02:30 AM.


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