Add Author Name & Date to All Homepage Article Images

Posted in: Newsmag
Post count: 8

Hi all! How can I add the author name and the date of all the articles to the small article boxes? Also- for the top left “Greetings” article- is there anyway to make the title appear the same as the rest of the articles even though its a “feature” article? https://lifequestjournal.com/

Post count: 23312

Hello rosiefaulkner1989,

I saw that you are using the Big Grid 6 which uses module mx5 and module mx13. If you want to display the author name and date for small article boxes you should edit the td_module_mx13.php and add this code from here -> https://www.screencast.com/t/vXe9IRTo

Thanks for the message!

Post count: 8

I actually do not have a td_module_mx13.php where my other modules are. I checked in /wp-content/themes/newsmag/includes/modules. I have td_module_mx1 and all the way up to td_module_mx11.php but I do not have td_module_mx13.php. Is this the issue? Let me know where to find td_module_mx13.php or if I have to create one or if you’d like admin access to look further into the issue.

Post count: 8

For good measure, I inserted the code into td_module_mx5.php and still the author name and dates do not appear on the boxes in the first block.

Post count: 23312

Hello rosiefaulkner1989,

Did you have cleared all the caches after you have made this changes through the code? Make sure that you have correctly added and check the results.

Thanks for your understanding!

Post count: 8

I cleared the cache- here’s what I have in td_module_mx5.php:

<?php
/**
* Created by PhpStorm.
* User: tagdiv
* Date: 03.02.2015
* Time: 10:05
*/

class td_module_mx5 extends td_module {

function __construct($post, $module_atts = array()) {
parent::__construct($post, $module_atts);
}

function render($order_no) {
ob_start();

$title_length = $this->get_shortcode_att(‘mx5_tl’);
?>

<div class=”<?php echo $this->get_module_classes(array(“td-big-grid-post-$order_no”, “td-big-grid-post”, ‘td-big-thumb’)); ?>”>
<?php
echo $this->get_image(‘td_537x360’);
?>
<div class=”td-meta-info-container”>
<div class=”td-meta-align”>
<div class=”td-big-grid-meta”>
<?php if (td_util::get_option(‘tds_category_module_mx5’) == ‘yes’) { echo $this->get_category(); }?>
<?php echo $this->get_title($title_length);?>

<div class=”meta-info”>
<?php echo $this->get_title($title_length);?>
<div class=”td-editor-date”>
<?php if (td_util::get_option(‘tds_category_module_mx1’) == ‘yes’) { echo $this->get_category(); }?>
<?php echo $this->get_author();?>
<?php echo $this->get_date();?>
</div>
</div>
</div>
<?php echo $this->get_comments();?>

</div>

<?php return ob_get_clean();
}
}

Post count: 23312

Hello,

Where did you have used the module mx5 into your website? Provide the exact URL and some useful screenshots with the problem.

Thanks.

Post count: 8

Path of module mx5: lifequestjournal/​wp-content/​themes/​Newsmag/​includes/​modules/​td_module_mx5.php

Screenshots:
https://lifequestjournal.com/wp-content/uploads/2018/10/Screen-Shot-2018-10-14-at-2.35.31-AM.png
*This is a screenshot of the homepage- I added a red circle for where the dates should be added.

https://lifequestjournal.com/wp-content/uploads/2018/10/Screen-Shot-2018-10-14-at-2.36.38-AM.png
*This is a screenshot of module mx5

Post count: 23312

Hello,

I suppose that you are using the Big Grid 6, right? Also, if you want to display the Author name and date, you should use the code below and place it in the Theme panel -> Custom CSS Area.

.td-grid-style-1 .td-small-thumb .td-module-meta-info {
display: block;
}

The result is here -> https://www.screencast.com/t/5sVTArR1

Thanks for your understanding!

Post count: 8

Works perfectly!

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newsmag’ is closed to new topics and replies.