![]() |
How to remove Posted On/Posted By on Wordpress posts? 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 |
Re: How to remove Posted On/Posted By on Wordpress posts? 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! |
Re: How to remove Posted On/Posted By on Wordpress posts? 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! |
Re: How to remove Posted On/Posted By on Wordpress posts? Quote:
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 |
Re: How to remove Posted On/Posted By on Wordpress posts? 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'); Quote:
|
Re: How to remove Posted On/Posted By on Wordpress posts? 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: Tim |
Re: How to remove Posted On/Posted By on Wordpress posts? Try deleting <?php the_time('F jS, Y') ?> from your single.php and index.php. |
Re: How to remove Posted On/Posted By on Wordpress posts? 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 Quote:
|
Re: How to remove Posted On/Posted By on Wordpress posts? Quote:
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(); ?> |
Re: How to remove Posted On/Posted By on Wordpress posts? 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 |
| All times are GMT -6. The time now is 12:04 PM. |