• Resolved lyssa1204

    (@lyssa1204)


    Using the MH Magazine lite template. I have changed the comments and date which displayed under each image to short descriptions of the content under each photo , however this description does not display on each page as it does the home page. Some still only show the comments and date. How can I fix this ?
    Here is my code for the description.
    <p class="meta"><?php echo get_post_meta(get_the_ID(), 'mh-subheading', true); ?></p>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@mh-themes)

    Hi lyssa1204,

    thanks for using MH Magazine lite.

    Unfortunately it’s not really clear what you are referring to as the code you’ve posted isn’t related to dates or comments and in general there are several locations in the theme where dates and comments are being displayed.

    Please also note that the code you’ve posted is outdated and isn’t included anymore in the up-to-date versions of the theme. If you want to make use of subheadings, you could have a look at plugins like: https://wordpress.org/plugins/wp-subtitle/

    As an alternative, the premium version of MH Magazine has a subheading feature included as well.

    By the way, when it comes to theme customizations and custom coding, you shouldn’t modify the original theme files because these changes will be lost after theme updates. In case you’re familiar with coding, you could create a child theme and then modify the theme as you like by adding your own customizations.

    Thread Starter lyssa1204

    (@lyssa1204)

    Thank you for your response. I am sorry for not being descriptive enough. On our categorical pages we removed the comments and dates of each post and replaced it with a bit of code that pulls the sub heading and made it display under the image. After thorough examination and trial and error, we found that this code
    <?php the_excerpt(); ?> was pulling out a bit of text from each post. However not every post had text that the code could pull out. We commented out the code and replaced it with the previous code so that every post has a preview description. Using this line of code
    <?php echo get_post_meta(get_the_ID(), 'mh-subheading', true); ?>.
    We have seemed to solve our problem. Thank you for your time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Short description or subheading under the images of my content.’ is closed to new replies.