Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Add image with month and day left of post title Reply To: Add image with month and day left of post title

#15919
Mike
Participant

Resolved by adding wpsp_before_title hook to functions.php.

/* CALENDAR DATE ICON */
function calendar (){ ?>
<div class="calendaricon">
<? echo '<img src="https://myimage_url/wp-content/uploads/2020/05/cal_w_logo_starfleet.png" />'; ?>
<div class="month"><? the_time('M') ?></div>
<div class="day"><? the_time('j') ?></div>
</div>
<?
}
add_action('generate_before_entry_title', 'calendar');

add_action('wpsp_before_title', 'calendar');

Thanks Tom!

  • This reply was modified 1 year, 2 months ago by Mike.
  • This reply was modified 1 year, 2 months ago by Mike.