Forum Replies Created
-
AuthorPosts
-
OR
if you only want the breadcrumb you can place it by hand with a shortcode ( but without the title on the left)
function av_breadcrumbs_shortcode( $atts ) { return avia_breadcrumbs(array('separator' => '/', 'richsnippet' => true)); } add_shortcode( 'bread_crumb', 'av_breadcrumbs_shortcode' );
use it then as
[bread_crumb]
maybe there is a child-theme possibility now to comment that line out – but in former times i asked and searched for a solution – there was no other way to make it.
because all functions which starts with if(!function_exists(‘XXXX’)) can be replaced by a copy in functions.php child-theme
so here we go – both comes to your child-theme functions.php
the whole function:
if(!function_exists('avia_header_setting')) { function avia_header_setting($single_val = false) { global $avia_config; if(isset($avia_config['header_settings']) && $single_val && isset($avia_config['header_settings'][$single_val])) return $avia_config['header_settings'][$single_val]; if(isset($avia_config['header_settings']) && !$single_val) return $avia_config['header_settings']; //return cached header setting if available $defaults = array( 'header_position' => 'header_top', 'header_layout' =>'logo_left menu_right', 'header_size' =>'slim', 'header_custom_size' =>'', 'header_sticky' =>'header_sticky', 'header_shrinking' =>'header_shrinking', 'header_title_bar' =>'', 'header_social' =>'', 'header_unstick_top' =>'', 'header_secondary_menu' =>'', 'header_stretch' =>'', 'header_custom_size' =>'', 'header_phone_active' =>'', 'header_replacement_logo' =>'', 'header_replacement_menu' =>'', 'submenu_visibility' => '', 'overlay_style' => 'av-overlay-side', 'header_searchicon' => true, 'header_mobile_activation' => 'mobile_menu_phone', 'phone' =>'', 'sidebarmenu_sticky' => 'conditional_sticky', 'layout_align_content' => 'content_align_center', 'sidebarmenu_widgets' => '', 'sidebarmenu_social' => 'disabled', 'header_menu_border' => '', 'header_style' => '', 'blog_global_style' => '', 'menu_display' => '', 'alternate_menu' => '', 'submenu_clone' => 'av-submenu-noclone', ); $settings = avia_get_option(); //overwrite with custom fields if they are set $post_id = avia_get_the_id(); if($post_id && is_singular()) { $custom_fields = get_post_custom($post_id); foreach($defaults as $key =>$default) { if(!empty($custom_fields[$key]) && !empty($custom_fields[$key][0]) ) { $settings[$key] = $custom_fields[$key][0]; } } //check if header transparency is set to true $transparency = post_password_required() ? false : get_post_meta($post_id, 'header_transparency', true); } $header = shortcode_atts($defaults, $settings); $header['header_scroll_offset'] = avia_get_header_scroll_offset($header); //if sidebar main menu is active set the header accordingly and return the sidebar header if($header['header_position'] != "header_top") return avia_header_setting_sidebar($header, $single_val); //------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------ //if header main menu is above the logo set a var to indicate that and disable transparency and shrinking if( strpos( $header['header_layout'] , 'top_nav_header' ) !== false ) { $header['header_menu_above'] = true; $header['header_shrinking'] = 'disabled'; $transparency = false; } //set header transparency $header['header_transparency'] = ""; if(!empty($transparency)) $header['header_transparency'] = 'header_transparency'; if(!empty($transparency) && strpos($transparency, 'glass')) $header['header_transparency'] .= ' header_glassy'; if(!empty($transparency) && strpos($transparency, 'with_border')) $header['header_transparency'] .= ' header_with_border'; if(!empty($transparency) && strpos($transparency, 'hidden')) $header['disabled'] = true; if(!empty($transparency) && strpos($transparency, 'scrolldown')) { $header['header_transparency'] .= ' header_scrolldown'; $header['header_sticky'] = 'header_sticky'; } //deactivate title bar if header is transparent //if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar'; //sticky and shrinking are tied together if($header['header_sticky'] == 'disabled') { $header['header_shrinking'] = 'disabled'; $header['header_scroll_offset'] = 0; } //if the custom height is less than 70 shrinking doesnt really work if($header['header_size'] == 'custom' && (int) $header['header_custom_size'] < 65) $header['header_shrinking'] = 'disabled'; //deactivate icon menu if we dont have the correct header if(strpos(avia_get_option('header_layout'), 'main_nav_header') === false) $header['menu_display'] = ""; if($header['menu_display'] == 'burger_menu') { $header['header_menu_border'] = "";} if(avia_is_burger_menu()) { $header['header_mobile_activation'] = "mobile_menu_tablet"; } //create a header class so we can style properly $header_class_var = array( 'header_position', 'header_layout', 'header_size', 'header_sticky', 'header_shrinking', 'header_stretch', 'header_mobile_activation', 'header_transparency', 'header_searchicon', 'header_unstick_top', 'header_menu_border', 'header_style' ); $header['header_class'] = ""; foreach($header_class_var as $class_name) { if(!empty($header[$class_name])) { if($header[$class_name] == "disabled") $header[$class_name] = $class_name."_disabled"; $header['header_class'] .= " av_".str_replace(' ',' av_',$header[$class_name]); } } //set manual flag if we should display the top bar $header['header_topbar'] = false; if(strpos($header['header_social'], 'extra_header_active') !== false || strpos($header['header_secondary_menu'], 'extra_header_active') !== false || !empty($header['header_phone_active'])){ $header['header_topbar'] = 'header_topbar_active'; } //set manual flag if the menu is at the bottom $header['bottom_menu'] = false; if(strpos($header['header_layout'],'bottom_nav_header') !== false) { $header['bottom_menu'] = 'header_bottom_menu_active'; } else { $header['header_class'] .= " av_bottom_nav_disabled "; } //header class that tells us to use the alternate logo if(!empty($header['header_replacement_logo'])) { $header['header_class'] .= " av_alternate_logo_active"; if(is_numeric($header['header_replacement_logo'])) { $header['header_replacement_logo'] = wp_get_attachment_image_src($header['header_replacement_logo'], 'full'); $header['header_replacement_logo'] = $header['header_replacement_logo'][0]; } } //header class that tells us to use the alternate logo if(empty($header['header_menu_border'])) { $header['header_class'] .= " av_header_border_disabled"; } $header = apply_filters('avf_header_setting_filter', $header); //make settings available globaly $avia_config['header_settings'] = $header; if(!empty($single_val) && isset($header[$single_val])) return $header[$single_val]; return $header; } }
to shift then the breadcrump under the first container:
function change_position(){ ?> <script> (function($){ $('#main .title_container').insertAfter('.html_header_transparency div.avia-builder-el-0'); })(jQuery); </script> <?php } add_action('wp_footer', 'change_position');
read next post
My guess is you’re using a transparent header there.
on the function: avia_header_setting in functions-enfold.php there is on line 831:
if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';
so if there is a transparent header the title_bar is hidden.
you can make a copy of that function in functions-enfold.php in your child-theme functions.php and comment that line out by setting two of them in front://
//if(!empty($transparency)) $header['header_title_bar'] = 'hidden_title_bar';
is there a livelink for your page?
By the way this would be a nice to have thing dear Mods!
An ALB Element that has all of the functions of color-section but is not a full-width element. I mean a container with the opportunity to pull in other ALB Elements.
Color-Section is a full-width container. Every sidebar will go under the last color-section you use in ALB Layout.
So you have to consider if you need such a container ( grid-row is a fullwidth container too ) in the middle of your layout. You can use a 1/1 container. This is not a full width element.February 1, 2019 at 10:53 am in reply to: Social Media icons in footer widget instead of socket #1061451third method :
we create a shortcode for it ( to child-theme functions.php ):function social_bookmarks_shortcode() { echo '<h3 class="widgettitle socials">Social Bookmarks</h3>'; $social_args = array('outside'=>'ul', 'inside'=>'li', 'append' => ''); echo avia_social_media_icons($social_args, false); } add_shortcode('social-bookmarks', 'social_bookmarks_shortcode');
code to quick css:
.widgettitle.socials { margin: 45px 0 5px !important; } #footer .social_bookmarks li { margin-right: 10px; } ul.social_bookmarks + .widget { display: none; }
the original widget heading is set to display:none
then you can insert the shortcode into a text-widget or html-widget as :[social-bookmarks]
February 1, 2019 at 10:26 am in reply to: Social Media icons in footer widget instead of socket #1061447/*** custom social bookmarks widget ****/ function social_bookmarks_register_widget() { register_widget( 'add_social_bookmarks' ); } add_action( 'widgets_init', 'social_bookmarks_register_widget' ); class add_social_bookmarks extends WP_Widget { public function __construct() { $widget_ops = array( 'classname' => 'socialbookmarks-widget', 'description' => __('A widget that displays the social bookmarks', 'avia_framework') ); parent::__construct( 'add_social_bookmarks', THEMENAME.' Social Bookmarks', $widget_ops ); } public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); echo $args['before_widget']; //if title is present if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; //output echo $before_widget; $social_args = array('outside'=>'ul', 'inside'=>'li', 'append' => ''); echo avia_social_media_icons($social_args, false); echo $after_widget; } public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) $title = $instance[ 'title' ]; else $title = __( 'Social Bookmarks', 'avia_framework' ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> </p> <?php } public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; return $instance; } }
for quick css like above:
#footer .social_bookmarks { float: left; margin: 15px 0 0 ; position: relative; } #footer .social_bookmarks li { float: left; clear: right !important; margin-right: 10px; border: 1px solid #999; }
You will then have your own widget for it and can drag it in a widget-area of your choice
All social Buttons you will define on Enfold Options will be thereFebruary 1, 2019 at 10:24 am in reply to: Social Media icons in footer widget instead of socket #1061445there are plenty of variants on board.
A fairly quick method is to first allow it to be displayed in the meta header at the top. Then you go into your frontend and examine the source code using Developer Tools. There you can copy the html code from the unordered list. You can copy this into html widget.
That’s it – it looks like:<ul class="noLightbox social_bookmarks icon_count_2"> <li class="social_bookmarks_facebook av-social-link-facebook social_icon_1"> <a href="#" aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello" title="Facebook"> <span class="avia_hidden_link_text">Facebook</span> </a> </li> <li class="social_bookmarks_twitter av-social-link-twitter social_icon_2"> <a target="_blank" href="http://twitter.com/#/" aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello" title="Twitter"> <span class="avia_hidden_link_text">Twitter</span> </a> </li> </ul>
in this case this comes to quick css to have a nice view and to have the buttons side by side:
#footer .social_bookmarks { float: left; margin: 15px 0 0 ; position: relative; } #footer .social_bookmarks li { float: left; clear: right !important; margin-right: 10px; border: 1px solid #999; }
But for me i took my social bookmarks widget code to child-theme functions.php
next postthese are the lines in formatting.php (WordPress File) to be responsible for multiple br replacement:
line 476ff// Change multiple <br>s into two line breaks, which will turn into paragraphs. $pee = preg_replace('|<br\s*/?>\s*<br\s*/?>|', "\n\n", $pee);
what makes me wonder is that the old filter in functions.php child-theme:
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );
seems not to work as it should.
Even the filter tiny_mce_before_init i try to influence it via that filter
add_filter( 'tiny_mce_before_init', 'change_mce_options' ); function change_mce_options( $init ) { $init['extended_valid_elements'] = '*[*]'; $init['remove_linebreaks'] = false; $init['convert_newlines_to_brs'] = true; $init['remove_redundant_brs'] = false; return $init; }
no effect
the edited textblock.php ALB Element with no wpautop stripslash : https://pastebin.com/M91L76av
_________________
A multiple <br> will always be tranformed to one p-tagthe thing is the multiple br use.
If you use in Visual Mode the shift and the return – you wil have one<br>
If you use the Return without shift it wil end in a p-tag.I don’t think you’re doing yourself a favor with a bump. This gives your theme a new timestamp and is therefore more recent. The mods I think work it off chronologically.
Besides, it’s not an enfold problem. The wpautop function is WordPress own and the TinyMCE is a bit hard to be influenced there.
I have already tried tinymce.init, but have not yet had any success.
It’s up to you to use a<br class="noclear">
in the html editor field several times instead of<br>
.I don’t understand your question. What exactly would you like to get changed?
Is it the Element Preview field you don’t like to have?
Dashboard – Enfold (Child) – Layout Builder and check: “Disable advance layout builder preview in backend”Edit : now i see the movie – it took some time for the movie to start.
Ah – one thing to mention: if you show the sidebar on mobile phones ( small screens) these rules have to be in media querries to have the normal behavior on responsive case
@media only screen and (min-width: 767px){ .page-id-29934 .container_wrap.sidebar_right .container { display: flex; justify-content: space-around; align-items: flex-start; } .page-id-29934 .sidebar { position: -webkit-sticky; position: sticky; bottom: 0; align-self: flex-end; width: 25% !important } }
the other way round – sidebar sticks on flex-start with a top position that it is visible will be nice too:
.page-id-29934 .sidebar { position: -webkit-sticky; position: sticky; top: 80px; align-self: flex-start; width: 25% !important; }
i did it here with a sidebar:
https://webers-testseite.de/buttons/
and we have to change the overflow rule ( the #top has to be present in the rule) to ( in this case only for that pages):
.responsive body#top.page-id-29934, .responsive body#top.page-id-33933 { overflow-x: visible; } .page-id-29934 #wrap_all, .page-id-33933 #wrap_all { overflow: visible; }
The sticky goes to the sidebar itself – but to find the right parent is a bit different – on that case:
.page-id-29934 .container_wrap.sidebar_right { display: flex; justify-content: space-around; align-items: flex-start; } .page-id-29934 .sidebar { position: -webkit-sticky; position: sticky; bottom: 0; align-self: flex-end; width: 25% !important }
The only thing – flex does change something to width definition – the sticky element needs the width info of enfold basic setting – in my case 25%
PS: ich sehe Ihr habt wohl eine Layerslider Standalone Lizenz. Denn dieser Origami Effekt ist glaube ich nur so verfügbar.
Da müsst Ihr aber glaube ich mehr Höhe für den home slider nehmen – da sind sonst die Schriften bei breiten Screens angeschnitten.habt ihr an den Grundeinstellungen dort was verändert?
Oder bei den Slides selber gibt es auch neben dem Hintergrund thumbnail die Position ( center bottom zB)Rikards code will solve the problem, but I don’t understand why it was created. Did you set a new rule that affects the headings?
On default there is a rule for .html_elegant-blog #top .post-entry .post-title, .html_elegant-blog .avia-content-slider .slide-entry-titleso did you change something for the titles on your css?
this would solve the issue too:
.html_elegant-blog #top .post-entry .post-title, .html_elegant-blog .avia-content-slider .slide-entry-title { padding: 0px 0 15px !important; margin-bottom: 10px !important; }
if you want to reduce the distance between the search results play with this value a bit:
#top .template-search.content .entry-content-wrapper { padding-bottom: 20px; }
what about the old topic – is it solved ? ;)
https://kriesi.at/support/topic/gridlayout/January 30, 2019 at 7:40 pm in reply to: using different logos on individual pages – old php solution no longer works #1060589try again but copy / paste this into your functions.php of child-theme instead.
The code is correct – maybe you have copied it from a post like yours ;) with wrong quotation marks !:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo){ if(is_page(9)){ $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }
hm ? :lol
Can’t wait to hear from you.
it seems that it is not so urgent as you said ;)
January 30, 2019 at 7:04 pm in reply to: How to Remove Admin Bar Editor Type from Displaying – (Advanced Layout Builder) #1060584And by the way – to get rid of this info in list view Pages / Posts in the backend – ad to functions.php of child-theme:
add_filter('display_post_states','remove_ALB_post_state',999,2); function remove_ALB_post_state( $post_states, $post ) { if("! has_blocks( $post->ID )") { unset($post_states['wp_editor']); } if("!= Avia_Builder()->get_alb_builder_status($post->ID)") { unset($post_states['avia_alb']); } return $post_states; }
Now all you have to do is select the right elements.
The wrapper must be the parent element of the sticky elements.
I will test it with color-section now and flex-columns.danke – das erleichtert die Ratschläge ungemein.
Ich schau dann nochmal rein. Du kannst mir das übrigens auch zusenden, wenn es online ist.
Unter meinem Nick hier sind die Kontaktinformationen ableitbar. click clickit is the overflow rule on Enfold which breaks the sticky element.
https://webers-testseite.de/sticky-elements/
i have set for that page :
.responsive body.page-id-33933 { overflow-x: visible; } .page-id-33933 #wrap_all { overflow: visible; }
theoretically it had to work with the 1280 on both – because only max-width includes the named break-point – the min-width not,
but maybe that is an old relict of the box-modell where the one browser includes the border to the box – the other not (so called 1px bug)
When you go through enfold css you will see that they alway diminish the max value about 1px ( the min-width are on even-numbered values ( 768, 990 etc.)so this must work too:
@media only screen and (max-width: 1400px) { .page-id-1602 #av_section_1 { display: none !important; } } .page-id-1602 #av_section_2 { display: none; } @media screen and (min-width: 1280px) and (max-width: 1400px) { .page-id-1602 #av_section_2 { display: block !important; } } .page-id-1602 #av_section_3 { display: none; } @media screen and (min-width: 900px) and (max-width: 1279px) { .page-id-1602 #av_section_3 { display: block !important; } }
Well here is a little thing i wrote to replace tags with others:
this comes to functions.php of your child-themefunction replace_tags_with_tags(){ ?> <script> (function($) { function replaceElementTag(targetSelector, newTagString) { $(targetSelector).each(function(){ var newElem = $(newTagString, {html: $(this).html()}); $.each(this.attributes, function() { newElem.attr(this.name, this.value); }); $(this).replaceWith(newElem); }); } replaceElementTag('tag-to-replace', '<newTag></newTag>'); }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
the thing you had to adjust is now only that line:
replaceElementTag('tag-to-replace', '<newTag></newTag>');
first is the tag to replace ( be specific ) the second is the new surrounding tag.
All attributes from the first goes to the new tag !function replace_tags_with_tags(){ ?> <script> (function($) { function replaceElementTag(targetSelector, newTagString) { $(targetSelector).each(function(){ var newElem = $(newTagString, {html: $(this).html()}); $.each(this.attributes, function() { newElem.attr(this.name, this.value); }); $(this).replaceWith(newElem); }); } replaceElementTag('h2.woocommerce-loop-product__title', '<h3></h3>'); replaceElementTag('h2.woocommerce-loop-category__title', '<h3></h3>'); }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
you can add more lines to replace more tags separated by semicolon
Just adjust it to your needs – you have to know the tag before ( the more selective you are the better).
But i do not know if it will work with a slider – but i think it willhttps://www.w3schools.com/css/css_rwd_mediaqueries.asp
max-width: 1280px means<= 1280px
( the 1280px is in the rule)
min-width: 1280px means> 1280px
(1280px is out of that rule)so this should be ok !!! but if you want to be sure leave a 1px distance between.
@media only screen and (max-width: 1400px) { .page-id-1602 #av_section_1 { display: none !important; } } .page-id-1602 #av_section_2 { display: none; } @media screen and (min-width: 1281px) and (max-width: 1400px) { .page-id-1602 #av_section_2 { display: block !important; } } .page-id-1602 #av_section_3 { display: none; } @media screen and (min-width: 900px) and (max-width: 1280px) { .page-id-1602 #av_section_3 { display: block !important; } }
-
AuthorPosts