Text above

Home Forums Calendar Products Community Events Text above

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #959462
    Gisela Nilsson
    Participant

    Hello, I am on this page: http://www.guidetovintage.com/wp-admin/edit.php?post_type=tribe_events&page=tribe-events-calendar&tab=display

    In this section:
    Advanced Template Settings
    Add HTML before event content

    I added text there and it is displaying above the Events in my “Events” page (where all my events are listed) but it is also showing in my Add events page which has the form for users to submit events.

    I didn’t expect it to display in the page with the Add events form and it makes no sense to me to have it there. Can I remove it? If I have to edit or add code in a php file, please be extremely detailed as I have no coding background whatsoever and last time I tried to add code, I got locked out of Admin in WP altogether.

    Thank you,
    Gisela

    #959643
    Barry
    Member

    Hi Gisela,

    The intention is for any messages/HTML you add via the before and after event content fields to display on all event related pages – so what you are experiencing is the expected behaviour.

    However, it’s fairly easy to stop it from displaying on the submission page only.

    https://gist.github.com/barryhughes/be4b056257ceb214d169#file-conditionally-stop-events-before-html-php

    The code above could be placed in your theme’s functions.php file – try inserting a few blank lines after the opening <?php tag and paste it in there – but if you have any doubt or problems it may be best to delegate this to a designer/developer you trust 🙂

    I hope that helps!

    #959650
    Barry
    Member

    Apologies Griselda, the code I referenced isn’t showing, which may be a temporary glitch. Here it is again:

    function conditionally_remove_tribe_before_html( $html )  {
    	if ( ! function_exists( 'tribe_is_community_edit_event_page' ) ) return $html;
    	if ( ! tribe_is_community_edit_event_page() ) return $html;
    	return '';
    }
    
    add_filter( 'tribe_events_before_html', 'conditionally_remove_tribe_before_html' );
    #959788
    Gisela Nilsson
    Participant

    Thank you! I removed it for now and will get someone to help me at a later point.

    Thank you for the quick response.

    Gisela

    #959825
    Barry
    Member

    Our pleasure 🙂

    #963241
    Barry
    Member

    Hi!

    It’s been a while so I’m going to go ahead and close this topic.

    • Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
    • Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Text above’ is closed to new replies.