Home › Forums › Calendar Products › Community Events › Tried to add HTML above community event but now have error
- This topic has 3 replies, 2 voices, and was last updated 9 years ago by Geoff.
-
AuthorPosts
-
April 26, 2015 at 6:56 pm #958399Gisela NilssonParticipant
Hi, I am a complete beginner and attempted to add some html code to the function.php file and now I can’t access admin in WP anymore. I know what to remove but I don’t know how to get into the file again to remove it.
I wanted to add instruction above the form for Community events and found this article:
https://theeventscalendar.com/knowledgebase/add-html-above-community-events-submission-form/I added the html at the very end in function.php which I realize was wrong…
I get this error:
Parse error: syntax error, unexpected ‘Event’ (T_STRING), expecting ‘,’ or ‘;’ in /home/gisnil/guidetovintage.com/wp-content/themes/sugar-and-spice/functions.php on line 314What should I do to get back into Admin and remove the html I added? Please be very very detailed as I am a complete novice.
As I know what the issue is, I have not deactivated any plugins or reverted the theme. My site is not launched yet.
THANK YOU!!!!!!
April 27, 2015 at 9:20 am #958587GeoffMemberHi guidegirl, thanks for getting in touch and welcome to the forums!
Sorry for the trouble here. It looks like you may just need to try pasting that snippet into you functions.php file a little differently.
Are you able to try pasting it again right after the opening <?php tag at the top of the file? Does that change anything for you?
Otherwise, you can try pasting it at the very bottom of the file, but try wrapping in in PHP tags:
<?php // Adds HTML above Community Events form add_action('tribe_events_community_form_before_template', 'my_custom_text'); function my_custom_text() { echo " Here are some instructions for filling out this form: "; echo "</pre> <ol> <li>Step 1</li> <li>Step 2</li> <li>Step 3</li> <li>Step 4</li> </ol> <pre>"; } ?>
Let’s start there and see what we find. 🙂
Cheers!
GeoffApril 27, 2015 at 4:49 pm #958766Gisela NilssonParticipantHi Geoff,
thank you for the quick response. I had a friend help me out so the issue is solved.
Glad to know you guys are there in case I mess up again.
Thank you,
GiselaApril 28, 2015 at 7:45 am #958917GeoffMemberSweet, I’m glad things got sorted out! We’re definitely here for you, so please feel free to hit us back up with a new thread if any other questions pop up and we’d be happy to help. 🙂
Cheers!
Geoff -
AuthorPosts
- The topic ‘Tried to add HTML above community event but now have error’ is closed to new replies.