Forum Replies Created
-
AuthorPosts
-
you can not change the tags via quick css!
did you test this ( i would prefer ) : https://kriesi.at/support/topic/heading-tags-in-the-footer-widget-areas/#post-1198686
or that: https://kriesi.at/support/topic/heading-tags-in-the-footer-widget-areas/#post-1198679
Sorry double post
yes – and maybe then you have to style a bit this new content:
.search-result-counter { padding: 0; } .search-result-counter img { width: 100%; height: 100%; border-radius: 100px; }
and if you like to have both Counter and above the heading an image replace with f.e.
$searchimage = get_the_post_thumbnail( $the_id, 'entry_with_sidebar' ); // look to the info on the bottom - you can take what you like to have here echo "<span class='search-result-image'>{$searchimage}</span>"; echo "<span class='search-result-counter {$counterclass}'>{$post_loop_count}</span>";
then style it with f.e.:
.search-result-image img { width: 300px; }
_________________
just for info:
$avia_config['imgSize']['widget'] = array('width'=>36, 'height'=>36); $avia_config['imgSize']['square'] = array('width'=>180, 'height'=>180); $avia_config['imgSize']['featured'] = array('width'=>1500, 'height'=>430 ); $avia_config['imgSize']['featured_large'] = array('width'=>1500, 'height'=>630 ); $avia_config['imgSize']['extra_large'] = array('width'=>1500, 'height'=>1500 , $avia_config['imgSize']['portfolio'] = array('width'=>495, 'height'=>400 ); $avia_config['imgSize']['portfolio_small'] = array('width'=>260, 'height'=>185 ); $avia_config['imgSize']['gallery'] = array('width'=>845, 'height'=>684 ); $avia_config['imgSize']['magazine'] = array('width'=>710, 'height'=>375 ); $avia_config['imgSize']['masonry'] = array('width'=>705, 'height'=>705 , $avia_config['imgSize']['entry_with_sidebar'] = array('width'=>845, 'height'=>321); $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 );
-
This reply was modified 5 years, 3 months ago by
Guenni007.
March 28, 2020 at 10:37 pm in reply to: Beitragsbild eines Blogbeitrags automatisch anzeigen #1198720try this in your child-theme functions.php:
Here you can choose which of the image formats commonly used in Enfold you would like to use.
function thumbnail_in_content($atts) { global $post; return get_the_post_thumbnail( $the_id, 'entry_with_sidebar' ); // image-size you like to use - adjust to your needs } add_shortcode('postImg', 'thumbnail_in_content'); add_filter('avf_template_builder_content', 'avf_template_builder_content_postimage_mod', 10, 1); function avf_template_builder_content_postimage_mod($content = "") { if(is_singular('post') || is_singular('portfolio') ) { $featuredImage = do_shortcode("[postImg]"); $content = $featuredImage . $content ; } return $content; }
______________________________________
Just for Info – not to place in the child-theme
these are the used image sizes in Enfold:$avia_config['imgSize']['widget'] = array('width'=>36, 'height'=>36); $avia_config['imgSize']['square'] = array('width'=>180, 'height'=>180); $avia_config['imgSize']['featured'] = array('width'=>1500, 'height'=>430 ); $avia_config['imgSize']['featured_large'] = array('width'=>1500, 'height'=>630 ); $avia_config['imgSize']['extra_large'] = array('width'=>1500, 'height'=>1500 , $avia_config['imgSize']['portfolio'] = array('width'=>495, 'height'=>400 ); $avia_config['imgSize']['portfolio_small'] = array('width'=>260, 'height'=>185 ); $avia_config['imgSize']['gallery'] = array('width'=>845, 'height'=>684 ); $avia_config['imgSize']['magazine'] = array('width'=>710, 'height'=>375 ); $avia_config['imgSize']['masonry'] = array('width'=>705, 'height'=>705 , $avia_config['imgSize']['entry_with_sidebar'] = array('width'=>845, 'height'=>321); $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 );
i thought we could use a filter – but it is only set in class-sidebar-generator.php for sidebar widget titles
try this instead in your child-theme functions.php – it is better to replace it before it is inserted in the DOM
function register_custom_footer_widget(){ $footer_columns = avia_get_option( 'footer_columns', '5' ); for ($i = 1; $i <= $footer_columns; $i++){ unregister_sidebar( 'av_footer_'.$i ); register_sidebar(array( 'name' => 'Footer - column'.$i, 'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '<span class="seperator extralight-border"></span></section>', 'before_title' => '<h5 class="widgettitle">', 'after_title' => '</h5>', 'id'=>'av_footer_'.$i )); } } add_action( 'widgets_init', 'register_custom_footer_widget', 11 );
-
This reply was modified 5 years, 3 months ago by
Guenni007.
try this in child-theme functions.php:
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('#footer h3.widgettitle', '<h5></h5>'); }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
4.7.4 stayes the same here
because you have no shrinking header you can use a little scroll event to have that .
Then: is it realy the header that is your selector. On most cases the header_bg will do that. Because i do not see your staging site – it is hard to say something concrete.
Try: ( and adjust the 50px offset to your needs and the colors)
This will come to your child-theme functions.php:function header_background_change(){ ?> <script> (function($) { $(".header_bg").css("background-color", "green"); // see else setting - just to have the right start when no scroll has happend $(document).ready(function(){ $(window).scroll(function() { if ($(document).scrollTop() > 50) { // your wanted scroll distance $(".header_bg").css("background-color", "red"); } else { $(".header_bg").css("background-color", "green"); } }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'header_background_change');
by the way : if you are in editor mode to insert the sign – and hover the signs – the code for the sign is shown:
and if you look to the source code of such an icon you see these cryptic signs for it ( like on my example page too at the right side)
and you see that this little cryptic sign has the info inside it:
By means of the do_shortcode I can initiate that the content of this shortcut is placed at a location where I would like it to appear.
Wordpress or the themes have certain points where I can insert the shortcut. That is the reason why this is also called a “hook”.
The Enfold Shortcode is the equivalent for the html which is shown.
Now the only thing i did for your request is to stop for a moment the html – insert some code – and end the rest
BUT: if you are an absolute beginner with this – maybe you ask better a mod to help you by adding the desired to your theme
OK :
The first thing I would always advise on WordPress is to use a child theme.
Link for a predefined Child-Theme and some instructions: https://kriesi.at/documentation/enfold/child-theme/The advantages of a child theme usage greatly outweigh the few disadvantages; ; last but not least, the desired changes will be preserved with the next update.
The downloaded Child-Theme of Enfold has three files – one png is only to have a preview image in the themes section of your wordpress dashboard.
The child theme style.css is absolutely necessary to identify itself as a child of Enfold. And the function.php which is at the beginning empty ( only some outcommented lines and the starting code.
This child-theme functions.php can be used now to have additional code to the parent theme.One of this could be to activate the debug mode of Enfold:
So this comes to child-theme functions.php:// Debug Mode of Enfold function builder_set_debug(){ return "debug"; } add_action('avia_builder_mode', "builder_set_debug");
The first line is only to remember what we like to influence – on php code the two slashes implicates a one line comment.
From now on you have on every Enfold styled Page a Field under the layout field in Editor Mode: See here a simple Setting with one full-width slider and a color-section under it – with some heading:
(click to enlarge)
Now you can see below the layout field how Enfold works “under the hood”.
these shortcodes can be copied and used on different places. Copy the whole shortcode and replace: [the-copied-shortcode-from-debug-mode]add_action('ava_after_main_title', function() { echo do_shortcode("[the-copied-shortcode-from-debug-mode]"); });
the resulting code then comes to child-theme functions.php.
It might be good for posts and portfolio pages with sidebar not to have on the second place of the designing auxiliary site to have a color-section : because a color-section is a fullwidth element as the slider – so sidebar will start under this.
So for your needs it would be better to have a full-width slider first and then a 1/1 container for the Headings under it.the embeded Icons belongs to entypo-fontello icon set.
it is some time ago i did this for me to look the codes for these:
https://webers-testseite.de/enfold-entypo/index.htmlMarch 24, 2020 at 9:37 pm in reply to: Random background image (possibly from a list) in color section #1197118this is the same example-page:
The color-section has got custom ID: randomized
and has an image array for that// Random BG-Image function randomize_bg_image() { if(is_page(34024)){ ?> <script type="text/javascript"> (function($){ var images = ['o2-7.jpg', 'o2-1.jpg', 'o2-2.jpg', 'o2-3.jpg', 'o2-4.jpg', 'o2-5.jpg', 'o2-6.jpg']; $('#randomized').css({ 'background-image': 'url(/wp-content/uploads/' + images[Math.floor(Math.random() * images.length)] + ')' }); })(jQuery); </script> <?php } } add_action( 'wp_footer', 'randomize_bg_image' );
March 24, 2020 at 9:04 pm in reply to: Random background image (possibly from a list) in color section #1197097i did that here on the page : page-id-34024
https://webers-testseite.de/bg-scheduling/
the color-section has a bg-image ( this is not so important – but style the outlook with that image first ( contain; cover; repeat etc. pp)
This color-section has a custom-class: bg-scheduled
you see that the bg image is then taken from a source folder.
But this is scheduled per day with a fixed image for each weekday – but you see how you can do it. Hope you can transfer this to a randomized order. – i will have a look too.function schedule_bg_image() { if(is_page(34024)){ ?> <script type="text/javascript"> var imglocation = "/wp-content/uploads/"; function ImageArray (n) { this.length = n; for (var i =1; i <= n; i++) { this[i] = ' ' } } image = new ImageArray(7); image[0] = 'o2-7.jpg'; // Sunday image[1] = 'o2-1.jpg'; // Monday image[2] = 'o2-2.jpg'; // Tuesday image[3] = 'o2-3.jpg'; // Wednesday image[4] = 'o2-4.jpg'; // Thursday image[5] = 'o2-5.jpg'; // Friday image[6] = 'o2-6.jpg'; // Saturday var currentdate = new Date(); var imagenumber = currentdate.getDay(); document.getElementById('av_section_1').style.backgroundImage = 'url(' + imglocation + image[imagenumber] + ')'; </script> <?php } } add_action( 'wp_footer', 'schedule_bg_image' );
and it has to be the Layerslider? Would an Enfold Slider ( full-width f.e. ) also be possible?
don’t know why layerslider shortcode does not work with this method?for example a full-width slider and a following color-section.
style a page as you like to have the content.
copy that enfold shortcode and insert it in a hook via do_shortcodeadd_action('ava_after_main_title', function() { if (is_page(2604)){ echo do_shortcode("[av_slideshow_full size='featured' min_height='0px' stretch='' control_layout='av-control-default' src='' attachment='' attachment_size='' position='top left' repeat='no-repeat' attach='scroll' conditional_play='' animation='slide' autoplay='true' interval='5' id='' custom_class='' av_uid='av-k85x1xh3'] [av_slide_full id='35860'][/av_slide_full] [av_slide_full id='35865'][/av_slide_full] [av_slide_full id='35862'][/av_slide_full] [/av_slideshow_full] [av_section min_height='25' min_height_pc='25' min_height_px='500px' padding='default' custom_margin='0px' custom_margin_sync='true' color='main_color' background='bg_color' custom_bg='#dddddd' background_gradient_color1='' background_gradient_color2='' background_gradient_direction='vertical' src='' attachment='' attachment_size='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' shadow='no-border-styling' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='' bottom_border_style='' custom_arrow_bg='' id='' custom_class='' aria_label='' av_element_hidden_in_editor='0' av_uid='av-k85r9uui'] [av_heading heading='".get_the_title()."' tag='h2' style='blockquote modern-quote modern-centered' subheading_active='subheading_below' size='' av-medium-font-size-title='' av-small-font-size-title='' av-mini-font-size-title='' subheading_size='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' color='' custom_font='' margin='' margin_sync='true' padding='10' link='' link_target='' id='' custom_class='' av_uid='av-k85rator' admin_preview_bg=''] Wordpress Tag Line [/av_heading] [/av_section]"); } });
see here the result: https://webers-testseite.de/kontakt/
the pagetitle is inserted dynamically by that break in the code:".get_the_title()."
You see that even the first color-section on that page gets the right index as #av_section_2the basic is:
add_action('ava_after_main_title', function() { echo do_shortcode("[the-copied-shortcode-from-debug-mode]"); });
the if clause can handle all you like f.e.
if( is_single()||is_singular( 'event' )||is_search()||is_category()||is_page()|| is_singular( 'portfolio' )){
i do not see your staging site – i’m participant as you but
Is your logo is now an img tag with src svg or is it an inline svg file?
With your plugin – it is possible to replace these img svgs with inline svg.for browser compatibility it is necessary to give a width to the svg and you could try to set for non responsive case the .logo to display flex (or inline-flex)
try:
.logo a { display: flex; } .logo img[src$=".svg"] { width: 350px; }
if you decide to have inline svg – the .logo svg must have some extra css.
PS : activate the advanced setting on svg support and mark “load frontend css”
March 23, 2020 at 12:18 pm in reply to: Burger/Mobile submenu links / How can I add a further colour for the… #1195437Yes : see private content url – everything works without script – except the mega-title links with sub-menu level
increase the line-height for these titles.
March 23, 2020 at 11:29 am in reply to: Burger/Mobile submenu links / How can I add a further colour for the… #1195419but i really do not see the need for it : there is allready a class for the current menu item: current-menu-item
The only problem is that the first level parent li’s get the same class but in additon they become that class: active-parent-item
So this should do the job for mega menu sub-menu items if they have themself a sub-menu!#av-burger-menu-ul li:not(.active-parent-item) .current-menu-item a { color: green !important; }
and this here for normal first-level sub-menu links:
/*** colorize parent***/ #av-burger-menu-ul li.current-menu-parent.current-menu-item > a { color: red !important; } /** colorize active item ****/ #av-burger-menu-ul li.current-menu-item > a { color: green !important; }
the only need for a new class could be a mega-menu title with own link and sub-menu : there is only a class: av-width-submenu
may i see your site please – send me a link via e-mail if you have no other choice – see my nick or avatar.
-
This reply was modified 5 years, 3 months ago by
Guenni007.
You see here the instruction : https://kriesi.at/documentation/enfold/social-share-buttons/#how-to-add-custom-social-icons-to-enfold-options
and scroll a short distance to : In case of using an image
i actually always recommend to use pictures when there are only one or two additional icons.You see at the very end of parent functions.php file :
/* * register custom functions that are not related to the framework but necessary for the theme to run */
just after that ( but before functions-enfold.php is required ) you can add your custom snippets.
_____________
But :living the world of WordPress is so much easier if you take advantage of a child theme. So I would recommend you to set one up.
The clear advantages greatly outweigh the few disadvantages. Last but not least because of the preservation of all changes even after updates of the parent theme.
Enfold makes it quite easy for you to change even advanced installations to a child theme.March 20, 2020 at 3:36 pm in reply to: Import FontAwesome font in enfold icon import shows square in icon list in avia #1194805However, when I do the same with a fontawesome font, it shows an empty square in icon list in avia builder.
the fontawesome from fontello or where did you download it?
the logo if set is alway present : rule it via media querries as in layout.css
________Hi, I don’t see why this is only relevant for narrow transparent screen widths.
if you are below 768px (or 990px) you will generally not see the alternative logo. So why switch. For this case it would be sufficient to set only the normal logos.
So it is only relevant if you keep the transparency contrary to the default settings of Enfold.
In this case, it would be necessary to set a different alternative logo and then make the layout adjustments.But this is only relevant if you allow transparency for narrow screen widths.
This would certainly have been an important information in your introduction.On helper-main-menu.php since line 127 ( Enfold 4.7.3)
there is a condition that is bound to header_transparencyon functions-enfold.php since line 1166 :
//header class that tells us to use the alternate logo
the class : av_alternate_logo_active is set for that to #headeron layout.css there is ruled the visibility of that logo:
@media only screen and (max-width: 989px) { .responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > img{opacity:1} .responsive.html_mobile_menu_tablet #top .av_header_transparency .logo img.alternate{display:none;} } @media only screen and (max-width: 767px) { .responsive #top .av_header_transparency.av_alternate_logo_active .logo a > img{opacity:1} .responsive #top .av_header_transparency .logo img.alternate{display:none;} }
there is another filter that can do the job:
add_filter('avf_header_setting_filter','replace_transparent_logo_on_some_pages'); function replace_transparent_logo_on_some_pages($header){ if( is_page(123) ){ $header['header_replacement_logo'] = "https://url-to-the-new-logo"; } return $header; }
you can use any conditional tag wordpress offers – maybe you can use even
if (lang == 'en') {
you can use arrays :if( is_page( array( 42, 54, 6 ) ) ) {
etc. ppthe logo itself is possible with this as you said allready:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo){ if( is_page(21) ) { $logo = "http://www.domain.com/wp-content/uploads/logoforpage21.jpg"; } elseif ( is_page( array( 42, 54, 6 ) ) ) { $logo = "http://www.domain.com/wp-content/uploads/logoforpage42.jpg"; } elseif ( is_page() && !is_page(1307) ) { $logo = "http://www.domain.com/wp-content/uploads/logoforpage23.jpg"; } return $logo; }
It was actually quite a hard job to read myself back into it. But now it’s probably not that interesting to look at the solution anymore. Well – …
This workout i would only do if i had to add more than one icon to my enfold.
you can upload a svg file to fontello icon : http://fontello.com/
these svgs had to be monochrome – and sometimes do not work correct in fontello because of svg spezicications ( compound path etc. )
then activate these generated font-icons and name the font – then download.
here is that fontello generated zip
https://webers-testseite.de/fontello-bdbd84bd.zipgoto your Enfold-Child – Import/Export and upload that zip to your Enfold via : Icon Font Manager.
Because i named the font : kununu the font-family is then the same kununufunction avia_add_custom_social_icon($icons) { $icons['Kununu'] = 'kununu'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); // Register new icon as a theme icon function avia_add_custom_icon($icons) { $icons['kununu'] = array( 'font' =>'kununu', 'icon' => 'ue800'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
Styling : depends on you.
#top #wrap_all .av-social-link-kununu:hover a{ color:#fff; background-color:#99c612; }
But please read carefully: if you have updated the theme to 4.7.3 ( and i see you have done that) then the code : here is obsolete. The Theme Version 4.7.3 has this allready implemented.
And you link now as described here : https://kriesi.at/support/topic/how-to-link-to-tabs/#post-1157756maybe ask Günter to look to it
or take only the white sings as png files and style the background-colors for them.
Guess normal logo color of them is: #99c612See documentation here too:
https://kriesi.at/documentation/enfold/social-share-buttons/#how-to-add-custom-social-icons-to-enfold-optionsif there are not too many individual social icons, I would recommend not to use font icons, but to use images (png’s) instead
For this you would have to find a suitable image file for the icon – e.g.:
the whole thing is possible as circle too:To Register the new Icon on Enfold put this to your child-theme functions.php
function avia_add_custom_social_icon($icons) { $icons['Kununu'] = 'kununu'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Now you can add on Enfold-Child Options – Social Profiles – the new icon ( it is at the end of the list : link maybe: https://www.kununu.com/ )
to have now the image for that new icon
you had to place this to your quick css
(the image dimensions depends on your other settings for social media icons – standard seem to be 30px):#top #wrap_all .av-social-link-kununu a:before{ content: ""; width: 30px; height: 30px; float: none !important; display: inline-block !important; vertical-align: middle; background: url(PATH-TO-YOUR-IMAGE/kununu-quad.png) no-repeat center center; background-size: contain; } /**** hover style - just an example - if you make the image a bit smaller - you can style background-color ***/ #top #wrap_all .av-social-link-kununu:hover a { -webkit-filter: hue-rotate(180deg); filter: hue-rotate(180deg) }
see here in my footer the example: https://webers-testseite.de/#footer
-
This reply was modified 5 years, 3 months ago by
-
AuthorPosts