Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 5th Sep 2011, 01:33 PM   #1
HyperActive Warrior
 
Join Date: 2007
Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 Posts
Default
How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

How do I remove "Posted On" and "Posted By" on my Wordpress posts? I am using WP Portfolio Press theme and have managed to mangle this. Can someone please give me some advice? Here is what I have so far: Reunion Info | Valley High School Class of 1986

Thanks,
C
CarrieD is offline  
Unread 5th Sep 2011, 03:26 PM   #2
Entreprenuerial-blooded
War Room Member
 
KyleGolemMedia's Avatar
 
Join Date: 2011
Location: US
Posts: 368
Thanks: 44
Thanked 38 Times in 32 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

There's a fair chance you need to dive into comments.php. Within that, you'll know that "Posted On" and "Posted By" will be written in HTML. Hunt them down and delete them. Make sure you remove the opening and closing PHP as well.

Hope that helps!
KyleGolemMedia is offline  
The Following User Says Thank You to KyleGolemMedia For This Useful Post:
Unread 5th Sep 2011, 04:59 PM   #3
HyperActive Warrior
 
Join Date: 2007
Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Thanks for trying to help me but "Posted On" and "Posted By" doesn't exist in the comments.php file on this theme. I'm still stuck so if you or anyone else can think of another option I'm all ears!
CarrieD is offline  
Unread 5th Sep 2011, 06:59 PM   #4
HyperActive Warrior
War Room Member
 
Tim Brownlaw's Avatar
 
Join Date: 2009
Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Originally Posted by CarrieD View Post

Thanks for trying to help me but "Posted On" and "Posted By" doesn't exist in the comments.php file on this theme. I'm still stuck so if you or anyone else can think of another option I'm all ears!
Hi Carrie,

Ready for some hunting of waskily chunks of generated HTML?

Just as some guidance on this... in the WP twentyten theme it has a function called twentyten_posted_on.... that has all that guff in it. That's in the the themes function.php file

So take a look in your themes function file... It might it in there.

If you have the WP files local on your PC you can do a search for the term "posted on" and it will reveal all!

Once you do find the function - if there is one... you can search through the other files and just comment out / remove the call to it...

If that's still all confusing and the theme you are using is freely available, let us know and I can hunt it down for you.... But it's good fun if you have a go at it first!

Cheers
Tim

Great Success is built from many little successes!

http://www.timbrownlaw.com - My Wee Part of the World.

http://www.LookingOverMyShoulder.com
Tim Brownlaw is offline  
The Following User Says Thank You to Tim Brownlaw For This Useful Post:
Unread 5th Sep 2011, 07:45 PM   #5
HyperActive Warrior
 
Join Date: 2007
Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Hi Tim, thanks for the reply. The theme that I am using is Portfolio Press and I looked on function.php and didn't find "posted on".

But, I pasted the following to the top of function.php and it excluded the date. I found this info online somewhere. I don't know if that is helpful to you.

function jl_remove_post_dates() {
add_filter('the_date', '__return_false');
add_filter('the_time', '__return_false');
add_filter('the_modified_date', '__return_false');
add_filter('get_the_date', '__return_false');
add_filter('get_the_time', '__return_false');
add_filter('get_the_modified_date', '__return_false');
} add_action('loop_start', 'jl_remove_post_dates');

Originally Posted by Tim Brownlaw View Post

Hi Carrie,

Ready for some hunting of waskily chunks of generated HTML?

Just as some guidance on this... in the WP twentyten theme it has a function called twentyten_posted_on.... that has all that guff in it. That's in the the themes function.php file

So take a look in your themes function file... It might it in there.

If you have the WP files local on your PC you can do a search for the term "posted on" and it will reveal all!

Once you do find the function - if there is one... you can search through the other files and just comment out / remove the call to it...

If that's still all confusing and the theme you are using is freely available, let us know and I can hunt it down for you.... But it's good fun if you have a go at it first!

Cheers
Tim
CarrieD is offline  
Unread 5th Sep 2011, 08:29 PM   #6
HyperActive Warrior
War Room Member
 
Tim Brownlaw's Avatar
 
Join Date: 2009
Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Hi Carrie,

I had a look and found the following...

There are 3 files in total where this little bit happens.

Line 15 to 26 in loop.php
Line 18 to 29 in single.php
Line 18 to 29 in single-portfolio.php

So you can edit these files via your WP Admin - and look for this section ( as mentioned above ) and delete them

PHP Code:
<div class="entry-meta">
  <?php
    printf
( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1" rel="bookmark"><time class="entry-date" datetime="%2" pubdate>%3</time></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4" title="%5">%6</a></span>', 'portfoliopress' ),
    
get_permalink(),
    
get_the_date( 'c' ),
    
get_the_date(),
    
get_author_posts_url( get_the_author_meta( 'ID' ) ),
    
sprintf( esc_attr__( 'View all posts by %s', 'portfoliopress' ), get_the_author() ),
    
get_the_author()
    );
    
?>
    </div><!-- .entry-meta -->
Cheers
Tim

Great Success is built from many little successes!

http://www.timbrownlaw.com - My Wee Part of the World.

http://www.LookingOverMyShoulder.com
Tim Brownlaw is offline  
The Following User Says Thank You to Tim Brownlaw For This Useful Post:
Unread 6th Sep 2011, 03:21 AM   #7
Steve Mack
 
Join Date: 2010
Posts: 45
Thanks: 3
Thanked 3 Times in 3 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Try deleting <?php the_time('F jS, Y') ?> from your single.php and index.php.
stevemack is offline  
The Following User Says Thank You to stevemack For This Useful Post:
Unread 6th Sep 2011, 11:10 AM   #8
HyperActive Warrior
 
Join Date: 2007
Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Hi Tim, I appreciate your help. I made the edit that you gave me but got this when I tried to view the pages:
Parse error: syntax error, unexpected ',', expecting ')' in /home/mokeymoke/valleyhigh1986.com/wp-content/themes/portfolio-press/single-portfolio.php on line 25

Originally Posted by Tim Brownlaw View Post

Hi Carrie,

I had a look and found the following...

There are 3 files in total where this little bit happens.

Line 15 to 26 in loop.php
Line 18 to 29 in single.php
Line 18 to 29 in single-portfolio.php

So you can edit these files via your WP Admin - and look for this section ( as mentioned above ) and delete them

PHP Code:
<div class="entry-meta">
  <?php
    printf
( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1" rel="bookmark"><time class="entry-date" datetime="%2" pubdate>%3</time></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4" title="%5">%6</a></span>', 'portfoliopress' ),
    
get_permalink(),
    
get_the_date( 'c' ),
    
get_the_date(),
    
get_author_posts_url( get_the_author_meta( 'ID' ) ),
    
sprintf( esc_attr__( 'View all posts by %s', 'portfoliopress' ), get_the_author() ),
    
get_the_author()
    );
    
?>
    </div><!-- .entry-meta -->
Cheers
Tim
CarrieD is offline  
Unread 6th Sep 2011, 11:16 AM   #9
HyperActive Warrior
 
Join Date: 2007
Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Originally Posted by stevemack View Post

Try deleting <?php the_time('F jS, Y') ?> from your single.php and index.php.
Hi Steve,
Index.php and single.php doesn't have that info. Copied below is what is in the index.php and I did a search on single.php to make sure that it doesn't have that info.

<?php
/**
* @package WordPress
* @subpackage Portfolio Press
*/
?>

<?php get_header(); ?>

<div id="content">

<?php get_template_part( 'loop', 'index' ); ?>

</div><!-- #content -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
CarrieD is offline  
Unread 8th Sep 2011, 02:49 AM   #10
HyperActive Warrior
War Room Member
 
Tim Brownlaw's Avatar
 
Join Date: 2009
Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
Default
Re: How to remove Posted On/Posted By on Wordpress posts?
Share on: 
fb share twitter share gplus share more share

Hi Carrie,

I just tried it again and it "works for me"!
Make sure you delete that actual chunk of code from and including

<div class="entry-meta">
--- The rest of the code in my previous post ---
</div><!-- .entry-meta -->


You are removing a chunk of PHP wrapped in HTML. So if you are getting PHP errors you must not be removing the complete section I mentioned and just a part of it.

You might want to try again.
Don't go off the line numbers as such, they may appear differently for you.

Cheers
Tim

Great Success is built from many little successes!

http://www.timbrownlaw.com - My Wee Part of the World.

http://www.LookingOverMyShoulder.com
Tim Brownlaw is offline  
Closed Thread


Bookmarks

Tags
on or posted, posts, remove, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 11:48 AM.