Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Supreme › Author name not linking to author page
New Landing › How can we help? › Themeforest Theme Support › Supreme › Author name not linking to author page
- This topic has 13 replies, 3 voices, and was last updated 9 years by Mohammad – SUPPORT.
-
Posted in: Supreme
-
June 25, 2014 at 11:53 am #85659
Author name under post-carousel and blog section isnt linking to author page, it is linking to homepage instead.
In posts-carousel.php i found this piece of code which pulls author name and date and i need it modified to link to author page:
if ($show_details == “yes”) {
$items .= ‘<div class=”post-item-details”>’. sprintf(__(‘By %1$s on %2$s’, ‘swiftframework’), $post_author, $post_date) .'</div>’;
}Thanks!
June 25, 2014 at 1:32 pm #85745Hi,
Please find this code :
while ( have_posts() ) {
Replace with
while ( have_posts() ) { the_post();
Hope that should work and let me know your feedback.Thanks ๐
With Best Regards
Swift IdeasJune 25, 2014 at 2:01 pm #85778I already have that code snippet on line 51 in posts-carousel.php, it looks like this:
while ( have_posts() ) {the_post();
and it still isnt working, author name is linking to homepage…This is the code, can you take a look:
http://pastebin.com/Gf9vE4TMJune 25, 2014 at 2:45 pm #85842Hi,
Can you provide us a site link where we can that in action?
Best Regards,
RuiJune 25, 2014 at 2:53 pm #85847Sure thing, lustrelife.com/news is the site.
Only thing where it works is “Top Posts” section on the right, but that is plugin “WordPress popular posts”.
In post carousel and in blog it isnt working
June 25, 2014 at 5:05 pm #85949Can you provide us access to your site by private reply.
thanks
June 25, 2014 at 5:11 pm #85954This reply has been marked as private.June 25, 2014 at 10:24 pm #86025I notice that you have WP Super Cache installed.
Whenever you do any change you must clear the cache of WP Super Cache.Best Regards,
RuiJune 26, 2014 at 7:58 am #86122Yes, i know, otherwise changes wont show.
Any luck with trying to make the author link work?June 26, 2014 at 9:38 am #86162Hi,
I have changed 56 line of code
$post_author = get_the_author_link();
to
$post_author = '<a href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'" >'.get_the_author_meta('display_name').'</a>';
Thanks ๐
With Best Regards
Swift IdeasJune 26, 2014 at 4:49 pm #86392Awesome, thank you Mohammad, it works ๐
Just one more small question.Which file do i need to edit to make the same change to the category page (http://lustrelife.com/news/category/shopping/) because author link isnt working there.
Take care!
June 26, 2014 at 4:54 pm #86394Hi,
Please edit standard.php at /includes/post-formats/ .
Thanks ๐
With Best Regards
Swift IdeasJune 26, 2014 at 9:28 pm #86422Hey Mohammad, thanks a bunch for your help.
I did edit that file and uploaded it back, but the author link is still linking to the homepage (i am guessing it is taking author website instead of author page).
Change is done properly (here is a code of standard.php file:http://pastebin.com/57pL2SSt) but it still isnt showing up…Any advices?
June 27, 2014 at 3:15 am #86476Hi,
I have resolved the issue. I edited standard.php at /supreme-child/includes/post-formats/.
Thanks -
Posted in: Supreme
You must be logged in and have valid license to reply to this topic.