| | #1 |
| HyperActive Warrior Join Date: 2007 Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 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 |
| |
| | #2 |
| Entreprenuerial-blooded War Room Member Join Date: 2011 Location: US
Posts: 368
Thanks: 44
Thanked 38 Times in 32 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! |
| |
| The Following User Says Thank You to KyleGolemMedia For This Useful Post: |
| | #3 |
| HyperActive Warrior Join Date: 2007 Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 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!
|
| |
| | #4 | |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
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 | ||
| |
| The Following User Says Thank You to Tim Brownlaw For This Useful Post: |
| | #5 | |
| HyperActive Warrior Join Date: 2007 Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 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');
| |
| |
| | #6 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 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 |
|
Great Success is built from many little successes! http://www.timbrownlaw.com - My Wee Part of the World. http://www.LookingOverMyShoulder.com | |
| |
| The Following User Says Thank You to Tim Brownlaw For This Useful Post: |
| | #7 |
| Steve Mack Join Date: 2010
Posts: 45
Thanks: 3
Thanked 3 Times in 3 Posts
|
Try deleting <?php the_time('F jS, Y') ?> from your single.php and index.php.
|
| |
| The Following User Says Thank You to stevemack For This Useful Post: |
| | #8 | |
| HyperActive Warrior Join Date: 2007 Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 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
| |
| |
| | #9 | |
| HyperActive Warrior Join Date: 2007 Location: , , .
Posts: 115
Thanks: 56
Thanked 30 Times in 30 Posts
|
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(); ?> | |
| |
| | #10 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 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 |
|
Great Success is built from many little successes! http://www.timbrownlaw.com - My Wee Part of the World. http://www.LookingOverMyShoulder.com | |
| |
|
| Bookmarks |
| Tags |
| on or posted, posts, remove, wordpress |
| |