Home › Forums › Calendar Products › Events Calendar PRO › Mini Calendar – default display month as that of next upcoming event
- This topic has 25 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
August 7, 2013 at 2:08 pm #59385
Graeme
ParticipantP.S. I should mention that I’m using a child theme, and so have placed this in the child themes functions.php – it shouldn’t make a difference, but just thought I’d mention it.
August 7, 2013 at 2:27 pm #59390Graeme
ParticipantP.P.S. I also got it working to a target month via passing $target_date through to the Tribe_Advance_Minical() function – it worked perfectly. Thought you might like to know as this is a good idea too.
August 7, 2013 at 3:19 pm #59409Barry
MemberGreat – thanks for the feedback Graeme.
I also got it working to a target month via passing $target_date through to the Tribe_Advance_Minical() function – it worked perfectly.
Yep that was the idea – you can set a specific month or else let it find the date of the next upcoming event date, if there is one (or it will default to the current month and year).
I should mention that I’m using a child theme, and so have placed this in the child themes functions.php
That shouldn’t cause any problems and is a good way to do things. Often you’ll find us saying people should add a piece of code to functions.php simply because so many users are comfortable doing this and have done it before, but doing it within a child theme (or in some cases a new plugin) is often the best path.
However, the list of events that appears below the calendar is not updating – it appears blank until I click the day of the month that contains an event, then it appears.
Good catch, let me check on that one.
August 7, 2013 at 4:11 pm #59418Barry
MemberOK, still doesn’t have all the characteristics you might be after but this version could get you closer: http://pastebin.com/h0Fw6YXi
August 8, 2013 at 3:46 am #59454Graeme
ParticipantSpot on Barry, works a treat – does exact what I need.
Thanks a lot for your help.
August 8, 2013 at 5:10 am #59466manelequinocci
ParticipantOne of you, do you mind telling me whereabout I have to insert the code in my theme’s function file, please? Thanks a lot!
August 8, 2013 at 5:15 am #59467manelequinocci
ParticipantGraeme, Barry… I’ve just solved my problem. I had to put your code at the very beginning of my function.php file.
It’s working perfectly… have a look if you wish: http://www.equinocci.com/diario-blog/
Cheers!
August 8, 2013 at 5:24 am #59468Graeme
Participantfunctions.php is generally in the root of your theme, not the plugin e.g.
wp-content/themes/[theme name]/functions.phpJust place the code Barry link above in the functions.php file anywhere between the opening and closing php tags.
—
If you are going to start editing your theme’s files, I suggest you use a child them – which is super simple to create, see this: http://codex.wordpress.org/Child_Themes. You can then create a new functions.php in the child theme folder and edit it. This will ensure any changes are not overwritten when you update your theme.Note: a child theme functions.php is IN ADDITION to the parent theme functions.php, so no need to copy the contents of the parent functions.php – just create a new one.
August 8, 2013 at 5:29 am #59469manelequinocci
ParticipantThanks a lot for your recommendations, Graeme. Will have a look asap. Cheers.
August 8, 2013 at 10:05 am #59503Barry
MemberThanks both, glad it’s working for you.
Graeme’s notes on child themeing are definitely solid points – don’t be misled by the fact that we so often tell people to drop code into functions.php – there are often better ways to do it, we’re basically just offering the most commonly-understood path.
In any event since it looks like we’re all good here I will close this thread.
Thanks!
July 7, 2015 at 6:27 am #979800Support 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 ‘Mini Calendar – default display month as that of next upcoming event’ is closed to new replies.
