Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #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.

    #287048

    Hey 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,
    Ismael

    #287062
    This reply has been marked as private.
    #287525

    Hi. Just checking in to see if you have any feedback for me. Thanks.

    #287612

    Hey!

    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,
    Ismael

    #287630
    #287689

    Hey!

    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,
    Peter

    #287729

    I 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(); ?>

    #287788

    Hi!

    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!
    Ismael

    #287851
    This reply has been marked as private.
    #288595

    Hi!

    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,
    Peter

    #288623

    I 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;
    }
    #288764

    Hey!


    @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,
    Ismael

    #289076

    Thanks 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.

    #289084

    Additional 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/

    #289120

    Hey 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. :)

    #289329

    Hey!


    @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!
    Ismael

    #289641

    Thanks 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;
    }

    #289893

    Hi!

    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!
    Ismael

    #291622

    Thanks 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.

    #292560

    Hi!

    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!
    Peter

    #296169

    Thanks Peter!

    #296205

    Hey!

    Glad I could help you :)

    Best regards,
    Peter

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Events Manager Single Event Page Title using Blog "News" header title’ is closed to new replies.