Want business name in widget recent reviews

Discussion in 'GeoCraft WordPress Theme' started by scfadmin, Mar 8, 2015.

Thread Status:
Not open for further replies.
  1. scfadmin

    scfadmin Member

    Joined:
    Dec 23, 2012
    Messages:
    57
    Likes Received:
    7
  2. sameerwalkar

    sameerwalkar Guest

  3. scfadmin

    scfadmin Member

    Joined:
    Dec 23, 2012
    Messages:
    57
    Likes Received:
    7
    Sameer - please see 3 attached screen shots, 1 of the recent listing widget before any code changes, 1 of the new line of code in latest_review.php and 1 of the recent listing widget after the code change. You can see that the same business name appears above every review. I have checked and each of those reviews is from a different user.

    The URL is http://shopsolonfirst.com. I can't leave it up very long like that since the site is in production use, so please take a quick look and let me know, so that I can undo the change again.

    Thank you for looking into this,

    - Cary
     

    Attached Files:

  4. sameerwalkar

    sameerwalkar Guest

    Hello Cary,

    Try and replace with the below code in the same file whose snapshot you have send:

    Code:
    <div><?php comment_author(); ?></div>
    If you also require title. Then you can put the this code along with title code as well, so that it will show author with post title.


    Thanks & Regards
    Sameer Khanwalkar
     
  5. scfadmin

    scfadmin Member

    Joined:
    Dec 23, 2012
    Messages:
    57
    Likes Received:
    7
    Hi Sameer - I made the change that you suggested, and it now correctly displays the name of the author of each review in the widget, which is cool. But what I wanted to show there is the name of the business that the author was reviewing. When I used the original code that was suggested, the same business name showed up on all of the reviews, even thought each one was for a different business.

    Thanks,

    - Cary
     
  6. ankurjain

    ankurjain Support Staff

    Joined:
    Mar 9, 2015
    Messages:
    26
    Likes Received:
    1
    Hello Cary,

    If you want to show name of the business then you should have to add this line :-
    Code:
    <div><?php echo get_the_title($aRecentComment->comment_post_ID); ?></div>
    .

    Thanks & Regards
    Ankur Jain
     
  7. scfadmin

    scfadmin Member

    Joined:
    Dec 23, 2012
    Messages:
    57
    Likes Received:
    7
    RESOLVED.

    Worked like a charm! Thank you Ankur.

    - Cary
     
  8. ankurjain

    ankurjain Support Staff

    Joined:
    Mar 9, 2015
    Messages:
    26
    Likes Received:
    1
    You are most welcome!

    Always feel free to ask your queries.

    Have a Nice day :)

    Thanks & Regards !
    Ankur Jain
     
Thread Status:
Not open for further replies.

Share This Page