-
AuthorPosts
-
July 3, 2014 at 7:50 pm #286838
Hi, hope you can help.
I’ve got the free version of the Events Manager plugin installed (http://wp-events-plugin.com/).
I’ve got the “display events as” set to “posts” which is fine, but the problem is that on single events pages, the Blog header title displays (which I actually renamed to “News”),
Is there a way via the child theme functions.php file or via creating a single-event.php file that would allow me to use the header title of “Screenings” instead of the default Blog header title of “News”?
Screenshot and links to single event page included in private content area of this post.
July 4, 2014 at 7:03 am #287048Hey killyman!
Thank you for using the theme.
Please refer to Dude’s response here: https://kriesi.at/support/topic/enfold-and-the-event-calendar-plugin/#post-174332
Add this code on functions.php:
add_filter('avf_title_args', 'fix_events_page_title', 10, 2); function fix_events_page_title($args,$id) { if (get_query_var('post_type') == 'tribe_events' && !is_single()) { if((tribe_is_upcoming() || tribe_is_past())) { $args['title'] = 'Events List'; } else if(tribe_is_showing_all()) { $args['title'] = 'List all events'; } else { $args['title'] = 'Screenings'; } } return $args; }
Best regards,
IsmaelJuly 4, 2014 at 8:31 am #287062This reply has been marked as private.July 5, 2014 at 4:53 pm #287525Hi. Just checking in to see if you have any feedback for me. Thanks.
July 6, 2014 at 2:45 am #287612Hey!
Thank you for the update.
I checked the link and the title is already “Screenings”. Please remove browser cache then reload the page a few times.
Best regards,
IsmaelJuly 6, 2014 at 4:34 am #287630Hi Ismael,
Please check again now.
http://www.everythingisforever.com/cms/screenings/sounds-of-summer-new-music-documentaries-2014/
ClarkJuly 6, 2014 at 1:02 pm #287689Hey!
Try this code:
add_filter('avf_title_args', 'fix_events_page_title', 10, 2); function fix_events_page_title($args,$id) { if (get_query_var('post_type') == 'tribe_events' && !is_single()) { if((tribe_is_upcoming() || tribe_is_past())) { $args['title'] = 'Events List'; } else if(tribe_is_showing_all()) { $args['title'] = 'List all events'; } } else if(get_query_var('post_type') == 'tribe_events' && is_single()) { $args['title'] = 'Screenings'; } return $args; }
Best regards,
PeterJuly 6, 2014 at 5:27 pm #287729I put the updated code in my child theme’s functions.php file and still no change. Is there something I’m supposed to be modifying in the single-event.php file I created in my child theme folder?
single-even.php file contents follow…
<?php
global $avia_config;/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();$title = __(‘Blog – Latest News’, ‘avia_framework’); //default blog title
$t_link = home_url(‘/’);
$t_sub = “”;if(avia_get_option(‘frontpage’) && $new = avia_get_option(‘blogpage’))
{
$title = get_the_title($new); //if the blog is attached to a page use this title
$t_link = get_permalink($new);
$t_sub = avia_post_meta($new, ‘subtitle’);
}if( get_post_meta(get_the_ID(), ‘header’, true) != ‘no’) echo avia_title(array(‘heading’=>’strong’, ‘title’ => $title, ‘link’ => $t_link, ‘subtitle’ => $t_sub));
?>
<div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
<div class=’container template-blog template-single-blog ‘>
<main class=’content units <?php avia_layout_class( ‘content’ ); ?> <?php echo avia_blog_class_string(); ?>’ <?php avia_markup_helper(array(‘context’ => ‘content’,’post_type’=>’post’));?>>
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*
*/get_template_part( ‘includes/loop’, ‘index’ );
//show related posts based on tags if there are any
get_template_part( ‘includes/related-posts’);//wordpress function that loads the comments template “comments.php”
comments_template( ‘/includes/comments.php’);?>
<!–end content–>
</main><?php
$avia_config[‘currently_viewing’] = “blog”;
//get the sidebar
get_sidebar();?>
</div><!–end container–>
</div><!– close default .container_wrap element –>
<?php get_footer(); ?>
July 7, 2014 at 3:28 am #287788Hi!
Thank you for the info.
Please try this:
add_filter('avf_title_args', 'fix_events_page_title', 10, 2); function fix_events_page_title($args,$id) { if(get_query_var('post_type') == 'tribe_events' && is_single()) { $args['title'] = 'Screenings'; } return $args; }
Cheers!
IsmaelJuly 7, 2014 at 7:28 am #287851This reply has been marked as private.July 8, 2014 at 4:48 pm #288595Hi!
Please create us an admin acount and post the login credentials as private reply. I need to debug the code first hand – I’m not sure why it’s not working at this point.
Best regards,
PeterJuly 8, 2014 at 5:57 pm #288623I think the problem is killyman is not using The Events Calendar from Modern Tribe, he’s using Events Manager, as he said in his first post and in the title. I’m not sure about what kind of conditionals are possible with Events Manager, but it looks to me like it uses a custom post type called “event” and it also looks like killyman just embedded a shortcode in a page called “Screenings,” without caring about an event archive or any of that, and wants that as the parent. So, I would propose that the filter should look like this:
add_filter('avf_title_args', 'fix_events_page_title', 10, 2); function fix_events_page_title($args, $id) { if (is_singular('event')) { $args['title'] = 'Screenings'; $args['link'] = get_permalink(get_page_by_title('Screenings')); } return $args; }
July 9, 2014 at 3:09 am #288764Hey!
@mayorninja: Yeah, I’m sorry about that. I thought he’s using Tri.be Events Calendar. Event Manager uses “event” as custom post type so that filter should work. Thanks! :)Best regards,
IsmaelJuly 9, 2014 at 4:28 pm #289076Thanks MayorNinja! That did the trick.
Now there are just 2 remaining mods/fixes I’d like to accomplish.
META INFO
On the event page itself just below the title of the event I’d like to remove or hide the meta info related to the “date” and “author” but don’t want to affect that same meta info that appears on News (Blog) post pages.SOCIAL MEDIA SHARING FEATURE
On the bottom of the event page the option to “Share this entry” appears but the mouse-over hotspots for each social media item is off for some reason. One has to position the mouse pointer toward the top of each box in order to activate the hover-over effect and click on the link.Any help with these two remaining mods/fixes would be much appreciated.
Here is a link to the page I’m referring to again.
http://www.everythingisforever.com/cms/screenings/5th-starigrad-paklenica-film-festival/Thanks.
July 9, 2014 at 4:43 pm #289084Additional Info for reference purposes. Below is a link to a News (Blog) post page with the “Share this entry” social media icons at the bottom in their correct working format.
http://www.everythingisforever.com/cms/nenad-distinguished-artist-of-the-beaux-arts-society/
July 9, 2014 at 5:20 pm #289120Hey killyman, since I’m free for a second I guess I will answer this too. Why not? :)
The easiest method to get rid of the post date and author without affecting other pages would be to put this in your quick CSS:
#top.single-event .fullsize .template-blog .post-meta-infos { display: none; }
And the sharing icons are actually being obstructed by the post delimiter in front of them. To solve this you just need to give it a visibility of hidden like on normal blog pages:
#top.single-event .fullsize .template-blog .post_delimiter { visibility: hidden; }
That should do it. @Ismael, I think if I had to answer as many support questions a day as you, I would sometimes miss something too. :)
July 10, 2014 at 6:00 am #289329Hey!
@mayorninja: Again, thank you for helping out. Appreciated! :)
@killyman: The suggestion of that awesome guy above should work for the post meta infos. Regarding the share this section, please use this:footer.entry-footer { z-index: 1000; position: relative; }
Cheers!
IsmaelJuly 10, 2014 at 5:41 pm #289641Thanks so much again Mayorninja! Thanks Ismael as well.
For the social media sharing footer should I use one over the other or both? See below.
FROM MAYORNINJA #######################
#top.single-event .fullsize .template-blog .post_delimiter {
visibility: hidden;
}FROM ISMAEL #######################
footer.entry-footer {
z-index: 1000;
position: relative;
}July 11, 2014 at 4:49 am #289893Hi!
Actually, you can test both one at a time. The purpose of the fixes are the same which is to remove the post delimiter from covering the share section. :)
Cheers!
IsmaelJuly 15, 2014 at 3:32 pm #291622Thanks again so much!
One last question. The left and right margins/padding on the news (blog) single post page is much greater than on the events (calendar) single event page. Is this greater margin/padding setting for blog posts default on the Enfold theme?
If I wanted to make the news (blog) single post pages’ left and right margins/padding percentage match the current events single post page margins/padding, what CSS would I need to add or modify?
Thanks.
July 17, 2014 at 4:52 pm #292560Hi!
You can extend the container width of the fullwidth blog with some css code – insert it into the quick css field or child theme style.css file:
#top .fullsize .template-blog .post .entry-content-wrapper { max-width: 100%; } #top .fullsize .template-blog .post .entry-content-wrapper > * { max-width: 100%; }
If you don’t like the results try to change the width value to i.e. 85 or 90%.
Cheers!
PeterJuly 26, 2014 at 8:09 am #296169Thanks Peter!
July 26, 2014 at 11:28 am #296205Hey!
Glad I could help you :)
Best regards,
Peter -
AuthorPosts
- The topic ‘Events Manager Single Event Page Title using Blog "News" header title’ is closed to new replies.