Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #1210991


    Solution with page contents works fine (, but I can not use page content on an event site (I use The event calendar plugin).

    Is it possible to add page content on top of each event?



    Hey bcerin,

    Thank you for the inquiry.

    Have you tried adding the page content directly in the default-template.php file of the events calendar plugin? You can also use a hook to insert additional content above the events’ content.

    add_action("ava_after_main_title", function() {
       if (is_singular("event")) {
           echo "something here";

    Best regards,


    No, I did not add the page content directly in the default-template.php. How can I do it?

    I have already downloaded this file, but I don’t know how to insert page content in this file.

    Thanks for the help!



    Thank you for the update.

    In the child theme folder, create a new directory called tribe/events/v2, copy the enfold > config-events-calendar > views > default-template.php file, then place it inside the new directory or the v2 folder. You can now add the modification in the template file.

    If you want to render the content of a particular page, use this snippet.

    $post = get_post(7752);
    $content = Avia_Builder()->compile_post_content( $post );
    echo $content;

    Replace 7752 with the actual ID of the page.

    Best regards,


    Thanks! I think we are closer to a solution.

    I created a folder, pasted code in the file, and move the new file in the folder. But now there is a big white space.

    I think I didn’t paste code on the right place?




    Thank you for the update.

    What is inside the 3790 page? It looks like there is a slider there but it’s not rendering properly. Can we access the site? Please post the login details in the private field.

    Best regards,


    Inside the 3790 page is “header” made with fukkwidth Easy Slider.



    Thank you for the info.

    We edited the tribe template and move the page content inside the container_wrap element or div.

    <div class='container_wrap container_wrap_first main_color fullsize'>
    				$post = get_post(3790);
    				 $content = Avia_Builder()->compile_post_content( $post );
    				 echo $content;

    It is working properly now.

    Best regards,


    Thanks. Just one more thing. If code is added, a map of the event hides behind the left menu (look on the picture).

    Without code looks:

    Without code

    With code looks:

    With code

    I hope we will finally find a solution.

    Best regards



    We added this code in the functions.php file to move the event content inside the main container.

    // move container to main element
    function ava_script_events_container() {
        if ( wp_script_is( 'avia-default', 'registered' ) ) {
            wp_add_inline_script( 'avia-default', "(function($) {
    			$('.single-tribe_events #main + .container').appendTo('.single-tribe_events #main');
    })(jQuery);" );
     add_action( 'wp_enqueue_scripts', 'ava_script_events_container', 9999);

    Please don’t forget to remove the cache prior to checking the page.

    Best regards,


    Thanks a lot!

    I like your theme and much more your support.



    You’re very welcome! And thank you for the kind words. We’ll close the thread now.

    Have a nice day.

    Best regards,

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Page content on event page’ is closed to new replies.