-
AuthorPosts
-
September 25, 2015 at 11:36 am #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"> .....
September 25, 2015 at 5:18 pm #509178Hi 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.
September 25, 2015 at 5:52 pm #509214what 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.
September 26, 2015 at 8:33 am #509407Hey!
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,
IsmaelSeptember 28, 2015 at 1:59 pm #510076Thanks Ismael – i will have a look to it
September 28, 2015 at 2:26 pm #510096Ok 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.
September 28, 2015 at 3:00 pm #510130Hey!
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.
September 28, 2015 at 3:31 pm #510169this 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.
September 28, 2015 at 4:28 pm #510232so 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 ?September 29, 2015 at 2:21 pm #510756Hi!
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,
IsmaelSeptember 29, 2015 at 3:32 pm #510792Thanks 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 nowSeptember 29, 2015 at 3:49 pm #510804Oh 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.
September 30, 2015 at 9:43 am #511234 -
AuthorPosts
- The topic ‘Styling Single Events Page ?’ is closed to new replies.