Home › Forums › Calendar Products › Events Calendar PRO › Add Month to Date/Day box in widget list view
- This topic has 4 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
April 7, 2015 at 8:41 pm #953940
feltwest
ParticipantHello
Is it possible to add the month to the little box that has the date/day in the widget list view?
Our home page http://www.feltwest.org.au has the list and I am constantly asked what month is that? Because people don’t read!!!I am not a coder but can follow instructions. π
Thanks in advance.
Cheers
SoosieApril 9, 2015 at 9:38 am #954367George
ParticipantHey Soosie,
This is technically possible, but is a customization that you’d mostly have to implement on your own.
However, we can definitely help you get started. The first step would be to check out our official Themer’s Guide here β https://theeventscalendar.com/knowledgebase/themers-guide/
Using those principles, make a file in your theme that is a duplicate of the /views/pro/widgets/modules/single-event.php file in your copy of Events Calendar PRO.
Then, add the month name somewhere in that file by making this function call somewhere you’d like:
<?php echo date_i18n( 'M', $postDate ); ?>Here’s an example of how I added that in my test version of this (note the single line of code I added around line 25/26) β https://gist.github.com/momnt/f98317f5ed55a99b3cf7
Once you get the month name added there, use a little bit of custom CSS to make it look how you want on your site. For example, I personally used this CSS:
.list-monthname { color: #fff; display: inline-block; width: 100%; clear: both; padding: 6px 0px; }Here’s how it all looked on my site after making these customizations β https://cloudup.com/crzVydXsXlp
Play around with these ideas, read through that Themer’s Guide, and I’m sure you’ll be able to come up with something nice for your site!
Let us know if this helps,
GeorgeApril 9, 2015 at 9:25 pm #954514feltwest
ParticipantHi George
Okey dokey that is exactly what we need so I will give it a go! But should it be the single-event.php or the list-widget.php ? I used the embed codes to create the list.
Cheers
SoosieApril 11, 2015 at 5:50 am #954770George
ParticipantHi Soosie,
The recommended file is /views/pro/widgets/modules/single-event.php for the PHP βΒ for that second block of code, the CSS, please place that in the bottom of your theme’s style.css file.
Consult that Themer’s Guide extensively so you understand the mechanisms here, it’s really helpful!
Do you have any other questions or concerns for now Soosie? If not, I’ll go ahead and close up this ticket β although you can always come back and open a new ticket if questions or issues arise down the road π
Cheers,
GeorgeJuly 7, 2015 at 6:31 am #983998Support 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 ‘Add Month to Date/Day box in widget list view’ is closed to new replies.
