Home › Forums › Calendar Products › Events Calendar PRO › Still having trouble with adding content above calendar
- This topic has 12 replies, 3 voices, and was last updated 13 years, 3 months ago by
Jonah.
-
AuthorPosts
-
January 17, 2013 at 4:07 pm #31072
Greg
ParticipantJonah had previously helped me out with this issue: https://theeventscalendar.com/support/forums/topic/shortcodes-in-page-template/#post-30866
As suggested, I installed the Advanced Custom Fields plugin with Options add-on. I created a custom field group and an option. The field name is “calendar_text”.
In my functions.php I created a filter to display this on the calendar month page only, along with some text:
add_filter( ‘genesis_after_post_title’, ‘genesis_after_post_title_filter’ );
function genesis_after_post_title_filter() { ?>text text text
<? }
The text displays, but the option I added does not. This is what happened when I tried to add a shortcode, as well as the template code from the Improved Include Plugin. This leads me to believe it's not a problem with the ACF plugin, but I'm not sure I have the template code right for ACF either. Can you please help?
January 17, 2013 at 4:08 pm #31073Greg
ParticipantHmm not all my code displayed:
function genesis_after_post_title_filter() { ?>text text text
<? }
January 17, 2013 at 4:09 pm #31074Greg
ParticipantGrr…how do you post code on here?
January 17, 2013 at 4:09 pm #31075Greg
ParticipantThis is the code I have to call my option:
January 17, 2013 at 4:09 pm #31076Greg
Participant[code][/code]
January 17, 2013 at 4:10 pm #31077Greg
ParticipantSorry, obviously I don’t know what I am doing 🙁
January 17, 2013 at 4:10 pm #31078Greg
Participantthe_field($calendar_text, ‘option’);
January 18, 2013 at 2:23 pm #31148Jonah
ParticipantJanuary 18, 2013 at 2:25 pm #31149Leah
MemberHey Lindy,
As you’ve found, posting code into the forums doesn’t work. If you could please post it using Pastebin, Gist or a similar service, that would be great.
Cheers,
LeahJanuary 21, 2013 at 9:27 am #31260Greg
ParticipantThanks for being patient with me 🙂
Here’s my code. http://snippi.com/s/2rcpta0
As I mentioned above, the text displays, but the option I added does not. This is what happened when I tried to add a shortcode, as well as the template code from the Improved Include Plugin. This leads me to believe it’s not a problem with the ACF plugin, but I’m not sure I have the template code right for ACF either. Can you please help?January 21, 2013 at 9:32 am #31263Jonah
ParticipantHi Lindy,
If your custom field is ‘calendar_text’ then you need to call it like this instead:
the_field('calendar_text', 'options');
Please see the Advanced Custom Fields documentation for more info: http://www.advancedcustomfields.com/docs/Cheers,
JonahJanuary 21, 2013 at 9:38 am #31265Greg
ParticipantSo I did that, and now my calendar moved over to the left and some random text appeared below the calendar. The text I added via the options add-on is still not appearing above the calendar.
January 21, 2013 at 9:48 am #31273Jonah
ParticipantHey Lindy,
Sorry about that, it should be:
the_field('calendar_text', 'option');
And it looks like you should be able to use the variable name too… I’m not sure why it’s not working for you. Make sure you have the custom field created and perhaps try posting to the ACF support forum to see why it’s not working for you.– Jonah
-
AuthorPosts
- The topic ‘Still having trouble with adding content above calendar’ is closed to new replies.
