Tagged: page content, the event calendar
-
AuthorPosts
-
May 8, 2020 at 11:43 am #1210991
Hi!
Solution with page contents works fine (https://kriesi.at/support/topic/header-and-sidebar/), 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?
Greetings!
May 12, 2020 at 3:51 pm #1212216Hey 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,
IsmaelMay 15, 2020 at 12:15 pm #1213252No, 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!
May 20, 2020 at 7:47 am #1214532Hi,
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,
IsmaelMay 20, 2020 at 11:50 am #1214623Thanks! 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?
May 25, 2020 at 8:53 am #1216028Hi,
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,
IsmaelMay 25, 2020 at 9:13 am #1216041Inside the 3790 page is “header” made with fukkwidth Easy Slider.
May 29, 2020 at 8:07 am #1217603Hi,
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'> <?php $post = get_post(3790); $content = Avia_Builder()->compile_post_content( $post ); echo $content; ?>
It is working properly now.
Best regards,
IsmaelMay 29, 2020 at 12:34 pm #1217668Thanks. 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:
With code looks:
I hope we will finally find a solution.
Best regards
June 1, 2020 at 8:41 am #1218365Hi,
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,
IsmaelJune 2, 2020 at 11:11 am #1218730Thanks a lot!
I like your theme and much more your support.
June 3, 2020 at 2:18 pm #1219062 -
AuthorPosts
- The topic ‘Page content on event page’ is closed to new replies.