Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #508919

    the Styling of the Events List Page is easy with enfold – because we can use the alb element blog with custom-taxonomies.
    But i would like to style the single-event page (posts).
    Is it possible to get some html code before the single event .
    On one page i got on every page a color-section with a unique heading. Is it possible to get this too on single event pages?

    I use now Events Manger for my events.

    and every single-event post results in a body with class : single-event

    so is there a possibility to get for each page with class single-event a div in this way:

    
    <div class="container_wrap container_wrap_first main_color fullsize">
        <div id="before-single-event"> ****</div>
        <div class="container">  .....
    #509178

    Hi Guenter!

    You’ll need to figure out which template is loading for these custom post types (events) and add the code in that way. Or you might be able to use the ava_after_main_title filter and check for the event type. You can do something like this for checking.

    if ( is_singular( 'event' ) ) {
    
    }

    Best regards,
    Elliott

    • This reply was modified 9 years, 2 months ago by Elliott.
    #509214

    what is this filter – have you perhaps an example how it could be look like

    • This reply was modified 9 years, 2 months ago by Guenni007.
    #509407

    Hey!

    You can find an example here: https://kriesi.at/support/topic/full-width-submenu-as-new-menu-location/#post-471378

    Maybe, you can ask the plugin developer, how to override the single post template. I found this documentation which might help: http://wp-events-plugin.com/documentation/using-template-files/

    Regards,
    Ismael

    #510076

    Thanks Ismael – i will have a look to it

    #510096

    Ok Ismael this will work –

    https://kriesi.at/support/topic/full-width-submenu-as-new-menu-location/#post-471378

    but how do i make an selective thing out of it.
    I only want to insert that code for the single event (class for body is than “single-event” )

    no code here because it will insert the heading section from my page here allthough i put it in code brackets
    how do you insert that code lines without showing the content on your link above?

    • This reply was modified 9 years, 1 month ago by Guenni007.
    #510130

    Hey!

    Did you try the code in my first post? https://kriesi.at/support/topic/styling-single-events-page/#post-509178

    That will check for the single post view of a certain post type. I’m not sure of the exact slug. It might be something different such as tribe_event or tribe_events.

    if ( is_singular( 'tribe_event' ) ) {
    
    }

    Cheers!
    Elliott

    • This reply was modified 9 years, 1 month ago by Elliott.
    #510169

    this works for me (see private content)

    how do i set up for single event ( by the way it is events manager not that one of tribe) the transparency header

    how to add class to header : av_header_transparency via functions.php for event?

    • This reply was modified 9 years, 1 month ago by Guenni007.
    #510232

    so i added the needed classes by:

    function add_transparency_on_events(){
    if ( is_singular( 'event' ) ){ 
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('html').addClass('html_header_transparency');
    jQuery('header').addClass('av_header_transparency');
    });
    </script>
    <?php
    }}
    add_action('wp_head', 'add_transparency_on_events');

    but this seem to be not enough.
    is there a script loading when having transparency headers ?

    #510756

    Hi!

    Please remove the js code then use this filter to change the header settings:

    add_filter('avf_header_setting_filter', function($header) {
    	
    	if(is_singular('event')) {
    		$header['header_transparency'] = 'header_transparency';
    		$header['header_class'] .= " av_header_transparency";
    	}
    
    	return $header;
    
    }, 10, 1);

    Best regards,
    Ismael

    #510792

    Thanks Ismael – i found a similar Request here on board and a solution from Josue

    but this had changed every page to transparency

    now your code makes the perfect solution for me.

    Thanks !!!
    Can be closed now

    #510804

    Oh one more question – can i do this for searchresults page too?

    oh i got it:

    add_filter('avf_header_setting_filter', function($header) {
    	
    	if ( is_singular( 'event' ) || is_search() ) {
    		$header['header_transparency'] = 'header_transparency';
    		$header['header_class'] .= " av_header_transparency";
    	}
    
    	return $header;
    
    }, 10, 1);
    • This reply was modified 9 years, 1 month ago by Guenni007.
    #511234

    Hey!

    Great! Glad we could help. :)

    Cheers!
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Styling Single Events Page ?’ is closed to new replies.