Home › Forums › Calendar Products › Events Calendar PRO › Adding month in events list
- This topic has 14 replies, 3 voices, and was last updated 10 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
May 25, 2015 at 9:32 am #964835
marlieinthesouth
ParticipantHi,
I am using events list with image, through a customed code in my function.php :
/* ADD IMAGE IN EVENT LIST
================================================== */
function custom_widget_featured_image() {
global $post;
echo tribe_event_featured_image( $post->ID, ‘thumbnail’ );
}
add_action( ‘tribe_events_list_widget_before_the_event_title’, ‘custom_widget_featured_image’ );but I would like to add the month next to the date. How can I do this ?
May 26, 2015 at 6:46 am #965060Josh
ParticipantHey,
Thanks for reaching out to us!
I took a look at our widgets and see that by default they do include the month in the date format. If you’re not seeing this at all, take a look at your settings under the Event Settings > Display tab within the date format section and ensure that your settings look like the following https://cloudup.com/cHMxs1MXj7I.
Additionally, would you mind providing a live link to the site where you’re experiencing the issue?
Thanks!
May 26, 2015 at 6:58 am #965072marlieinthesouth
ParticipantThis reply is private.
May 27, 2015 at 8:54 am #965362Josh
ParticipantHey Émilie,
Thanks for following up.
Ah, it looks like you would like that added to this part of the list template https://cloudup.com/cKve9EXKN5V.
You can do this by following our Themer’s Guide and copying the views > pro > widgets > modules > single-event.php file into your theme and modifying the “list-date” div to include the month in addition to the day and day number.
To do this, you can just copy one of the existing spans within that div and ensure you change the format code for the date ( the “D” or “d”) to be the correct one for displaying the month.
Let me know if this helps.
Thanks!
May 28, 2015 at 1:16 am #965567marlieinthesouth
ParticipantThis reply is private.
May 28, 2015 at 12:49 pm #965844Josh
ParticipantHey,
Thanks for following up and providing the code you’re currently using.
I took a look at the site and at the source level I’m not seeing the duplicated span that you have in the example. Is the code still active on your site. If so, it may not be placed in the proper place within your theme. Ensure that the file is placed in your theme at the following location:
tribe-events > pro > widgets > modules > single-event.php
Let me know if this helps.
Thanks!
June 8, 2015 at 4:38 am #967754marlieinthesouth
ParticipantThis reply is private.
June 8, 2015 at 11:13 pm #968035Josh
ParticipantHey Marlie,
Thanks for following up. Can you post the full template file code as a gist on http://gist.github.com and post it here so I can take a look at it?
Thanks!
June 8, 2015 at 11:39 pm #968044marlieinthesouth
ParticipantThis reply is private.
June 10, 2015 at 7:29 am #968444Josh
ParticipantHey,
Thanks for providing the full code!
I tested on my local install and noticed a single typo with the added span. Try using this code for that span https://gist.github.com/BeardedGinger/0a1ab86367c4837f75c5.
Once added, the month became visible in the block for the widget like so https://cloudup.com/ce5FcfAKp_0.
Let me know if this helps.
Thanks!
June 11, 2015 at 12:36 am #968707marlieinthesouth
ParticipantHi Josh,
Thanks again!
It didn’t have worked when I have add the file in my theme at tribe-events > pro > widgets > modules > single-event.php.
But I have tried with events-calendar-pro > pro > widgets > modules > single-event.php… and it’s fine!!!Thank you very much for your help.
Have a nice dayJune 11, 2015 at 12:42 am #968708marlieinthesouth
ParticipantHi Josh,
Thanks again!
It didn’t have worked when I have add the file in my theme at tribe-events > pro > widgets > modules > single-event.php.
But I it works when I modify the original file in the plugin.
I have tried with a folder name events-calendar-pro instead of tribe-events but it doesn’t work neither.June 11, 2015 at 12:42 am #968709marlieinthesouth
ParticipantHi Josh,
Thanks again!
It didn’t have worked when I have add the file in my theme at tribe-events > pro > widgets > modules > single-event.php.
But I it works when I modify the original file in the plugin.
I have tried with a folder name events-calendar-pro instead of tribe-events but it doesn’t work neither.June 11, 2015 at 9:19 pm #968945Josh
ParticipantHey,
That’s definitely strange. The file structure you’ve stated (tribe-events > pro > widgets > modules > single-event.php) looks right. A couple of suggestions that may help diagnose:
- Ensure that this has been added to the appropriate theme folder. Ensure it is within the active theme for your site.
- Ensure that the titles of each of the folders is spelled properly without any unintentional misspellings or typos.
Let me know if this helps.
Thanks!
July 7, 2015 at 6:32 am #984305Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Adding month in events list’ is closed to new replies.
