Show title on Related Posts

Discussion in 'BlogSpring WordPress Theme.' started by amaconline, Jul 2, 2019.

  1. amaconline

    amaconline Member

    Joined:
    Feb 17, 2013
    Messages:
    217
    Likes Received:
    6
    Hi guys, good to see you guys are still around to help us :)

    I have purchased this theme and I hope you can provide me some support. Currently the theme is designed to display related posts' thumbnails under each posts (single.php). The problem that I have with that is that by looking at the thumbnail it is impossible to tell what the post is about. I would like to also display the title of the post. I have tried (see red):

    file: single.php

    $my_query = new wp_query($args);
    if ($my_query->have_posts()) {
    while ($my_query->have_posts()) {
    $my_query->the_post();
    if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
    echo '<li>';
    the_title();
    bSpring_get_thumbnail(120, 90);
    echo '</li>';
    } else {
    echo '<li>';
    bSpring_get_image(120, 90);
    echo '</li>';
    }
    }
    } wp_reset_query();

    But it is not appearing correctly. Could you kindly guide me to the right direction.

    Many thanks.
     
  2. shemaela21

    shemaela21 Guest Staff Member

    Joined:
    Apr 6, 2019
    Messages:
    855
    Likes Received:
    1
    Hello,

    Thanks for contacting us,

    Just include the variable title in PHP tags.

    <?php the_title(); ?>

    I hope this will surely resolve the issue.

    If the issue persists then just kindly send the below-mentioned credential details at [email protected] along with the thread link.

    WordPress Website URL: -
    WordPress Username: -
    WordPress Password: -

    We will do the needful for you.

    You can also join our Exclusive Facebook Group of Colorway WordPress theme.
    https://www.facebook.com/groups/colorwaytheme/

    You can discuss WordPress updates, themes, plugins and our strong-minded community members will help you to grow your business.

    Regards,
    Shemaela
    InkThemes.com
     

Share This Page