Forum Replies Created
-
AuthorPosts
-
take a fullwidth-slideshow.
you can add to the image on caption a manual link (choose apply link to image) – add to the video link at the end a &iframe=true f.e.:https://player.vimeo.com/video/262210925?autoplay=1&loop=1&title=0&byline=0&portrait=0&iframe=true
see here: https://webers-testseite.de/huawei/
to pimp the whole thing a bit you can give to the hover effect some scalings – (get rid of the overlay white)
i thought he/she likes to replace the default h3 Iconbox title to a h2 title. – but i can not see the hidden private content – maybe there is more info on this.
i loaded the fa from maxcdn and the styles from the link ismael gave:
add_action( 'wp_enqueue_scripts', 'enqueue_awesome' ); function enqueue_awesome() { wp_enqueue_style( 'prefix-font-awesome', 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0' ); wp_enqueue_style( 'font-awesome-styles', 'https://unpkg.com/@coreui/coreui/dist/css/coreui.min.css', array(), '1.0' ); }
the only thing to correct was in quick css a bit:
.btn { font-weight: 600 !important} .btn-brand i { font-size: 22px } .btn-brand i { margin: -.375rem .75rem -.375rem -.75rem }
and don’t make line-breaks in text-field:
<button class="btn btn-brand btn-youtube" type="button"><i class="fa fa-youtube"></i>Youtube</button>
Edit : i removed the code above from my test-page now – because It does not meet the requirements of the GDPR
to change all captions from h2 to h1 put this into your functions.php of your child-theme:
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('.slideshow_caption h2.avia-caption-title', '<h1></h1>'); }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
the function above is a general tag replacement function under preventing every attribut set on the original tag
the lines of replacement are only separated by semicolon. so for example if you like to switch in the footer from h3 headings to h2 headings only add in the function:replaceElementTag('h3.widgettitle', '<h2></h2>');
read carefully on top of this page – it works with child-theme and edited Alb Elements:
https://webers-testseite.de/edited-enfold-alb-elements/#iconsor if you only want that for all icon-box titles instead of h3 a h2 – put this to functions.php of your child-theme
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('h3.iconbox_content_title', '<h2></h2>'); //you can add here more tag replacements }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
this solution ( you can get rid of the if is_page when you want to be active on all sites) will work.
On future Projects you can use my edited alb elements where you have the choice to set the h-tag as you like!
https://webers-testseite.de/edited-enfold-alb-elements/#slidersdon’t know – he has opend a new thread – but my solution with selfhosted video works !
on this case : If you want simple solutions, you have to be satisfied with simple requirements.
If you have no concerns about GDPR, you can enqueue the styles of Fontawesome via CDN.
So you can use it manual – but problem would be that these sources need the newest jQuery – not that common one that Enfold uses !
You can do it via functions.php of your child-theme:add_action( 'wp_enqueue_scripts', 'enqueue_awesome' ); function enqueue_awesome() { wp_enqueue_style( 'prefix-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0' ); }
So my Advice is to use fontello fontawesome – import that to Enfold and use it with Enfold buttons.
To style the buttons a bit more you can do that: https://webers-testseite.de/buttons/these are Enfold Buttons Alb with light-transparent layout and a bit of css
on Avia Layout Builder take a color-section.
Open that color section options dialog – click to the section background and set your wanted image.
Set your image behavior here too- if you like to repeat the background or if it is stretched. (on your example it seems to cover the element)
Set the image as you like to behave : scroll, parallax or fixed ( all will leave the screen on scrolling but with different effects)
Goto the tab on top : Section Background Overlay – set your overlay color if wanted – on your example it seems to be a black overlay color with f.e. 0.5 opacity.
Thats all – you can drag all you wanted into the color section nowby the way a bit offtopic – wouldn’t it be nice to have this on the prev/next navigation beween posts/portfolios.
maybe to the anchor itselffunction add_rel_attribute(){ ?> <script> (function($){ $('a.avia-post-prev').attr('rel', 'prev'); $('a.avia-post-next').attr('rel', 'next'); })(jQuery); </script> <?php } add_action('wp_footer', 'add_rel_attribute');
i do allways this code to functions.php of my child-theme – it deactivates the reset all button too:
function admin_head_mod() { echo '<style type="text/css"> #avia_quick_css .avia_description {float: none;margin-bottom: 20px !important;padding-left: 0 !important;width: 98%} #avia_quick_css .avia_control {float: left;max-width: 98% !important;width: 98% !important} .avia_footer_links li {float: left;padding-right: 20px} .avia_footer .avia_footer_save {float: left} .avia_reset {pointer-events: none !important } </style>'; } add_action('admin_head', 'admin_head_mod');
by the way: this should not happen if you got a newer wordpress version.
In former times – yes i do have that too, but now they gave some error-messages out to solve those issue.These issues can happen if you are having wrong brackets or forgotton semicolon.
if you got double function names ( this is probably one of the most common mistakes ) because here on board the code-snippets are often named the same way.
f.e. adding custom widgets to the header – but what if you like to have two widget-areas: all snippet functions here on board named : enfold_customization_header_widget_areaso adding two of them will cause an error (on former times a white screen of death) etc. pp
July 25, 2018 at 4:17 pm in reply to: Set YouTube Video or Featured Image to Full Width On Mobile Post #989771you are always welcome
and even if English is not my native language, I am probably understood, even if my sentence constructions are easily recognizable as German.hope you have adjusted the path ?
On my end : https://webers-testseite.de/weber/whdsolutions/
it seems to work with that:can you try this in your functions.php of your child-theme:
this filter you will only need if you havn’t got a secondary menu or social media – so there will be no header-meta
add_filter( 'avf_execute_avia_meta_header', '__return_true', 10, 1);
for you this will be enough i think:
add_filter( 'avia_meta_header', 'avia_append_search_nav_mod'); function avia_append_search_nav_mod() { global $avia_config; ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown menu-item-avia-special"> <a href="?s=" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'> <span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span> </a> </li>'; echo $items; }
Edit: i see it has on header meta a list-point so add this to your quick css:
#top #menu-item-search { list-style: none; }
July 25, 2018 at 6:40 am in reply to: Set YouTube Video or Featured Image to Full Width On Mobile Post #989496But I appreciate your kind offer, though. Thank you
I’m just afraid you’re not going to give me as much pleasure as you think.
I have only drunk coffee for years if it was made using a machine with an E61 brewing group.
(mine is a Rocket Espresso Giotto Evoluzione with rotation pump)
Such espresso machines are able to turn even a 100% Arabica into a dreamlike crema.https://thumb.ibb.co/eV5MjT/crema.jpg
not my Foto (i do not use bottomless filter holders)And I pimp Starbucks like Amazon.
By the way, Chuck Norris can count to infinity – two times ;)
July 24, 2018 at 11:06 pm in reply to: Set YouTube Video or Featured Image to Full Width On Mobile Post #989416please delete your comment on this rule:
// Full Width on Mobile for Blog Featured Images and Videosbecause on css you comment things by: /**** comment ***/
the method by //comment is used in php files
on selfhosted do this as code in the layer:
<video playsinline autoplay loop muted preload="metadata" style="min-width:100vw; min-height:56vw;" > <source src="path_to_your/VARVANI-3D.CG-Showreel-2018.mp4" type="video/mp4"> <img src="path_to_fallback_image/film-fallback.jpg" title="Your browser does not support the video tag"> </video>
this is very important to have: playsinline autoplay loop muted
can you please look if it starts now on your mobile devices: http://webers-testseite.de/weber/archie/
ok vimeo and youtube do not start here on layerslider.
why do you use the layerslider ? are other layers being superimposed?by the way is the page working: https://webers-testseite.de/weber/
with a selfhosted videoi ask because good old html5 <video … – there will be chances to be successfull
have you deleted all caches ( browser and maybe plugin-caches – and enfold merged files (js and css) ) ?
can you try this in your layer video embed code:
<iframe id="ytplayer" type="text/html" width="100vw" height="56.25vw" src="https://www.youtube.com/embed/YtSo17Wley8?autoplay=1&enablejsapi=1&loop=1&playsinline=1&rel=0&showinfo=0&color=white&iv_load_policy=3" frameborder="0" allowfullscreen></iframe>
see here the second slide with your video: http://webers-testseite.de/weber/archie/
on which different mobile devices have you tested this?
F.e. only since IOS 11 with new safari these video-backgrounds are supported!
What is your smart option – i can not find it in the api options?
why don’t you include in the iframe code an autoplay=1 option ?and for mobile (safari too) set the parameter :
&playsinline=1
As far as i know the advanced slider can do that for you.
see here a demo: https://webers-testseite.de/weber/
But this is a selfhosted small video, and only the newest browsers for mobile devices ( IOS11 with new Safari f.e.) will play that background video.On vimeo case : on sharing options you can see the embed options and press settings.
choose responsive and get rid of Author, Image and Title. Choose Autoplay and loop but no textlink !the code of your video will be:
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/258140746?autoplay=1&loop=1&title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
Very important now we change in that code something
1) That div will not work – and we do not need it – same thing with the script
2) Change positioning to relative !!!
3) width: 100vw and height: 56.25vw (on 16/9 videos)
4) give the iframe a class: vimeo (on vimeo it seems to be good to scale the iframe a bit to have no borders on full-width at very small screens)
Result:
<iframe class="vimeo" src="https://player.vimeo.com/video/258140746?loop=1&title=0&byline=0&portrait=0" style="position:relative;top:0;left:0;width:100vw;height:56.25vw;" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" frameborder="0"></iframe>
goto Advanced Layerslider make a new slider (responsive with width and height in the aspect ratio of 16/9)
add a video audio layer insert that code above and define that layer as background-video layer.see result here: https://webers-testseite.de/weber/archie/
do this to quick css:
iframe.vimeo { transform: scale(1.02); }
PPS: i have choosen the way over selfhosted video as background – because of GDPR ( DSGVO) reasons.
all big video hosters (youtube and vimeo) will send data from the visitors to their servers ( on minimum the IP) this is not allowes without an opt-in.well i understand this : Hello i have a problem. I have 7 categories with there own logo that he likes to change the logo for each category. – and not to have multiple logos
by the way dear Mods why doesn’t this do the job if i want to proof if a portfolio has “frontside” category ???
elseif ( is_singular( 'portfolio' ) && has_term( 'frontside', 'portfolio') ) { $logo = "https://webers-testseite.de/wp-content/uploads/unmute.png"; }
i realy don’t understand your construct – but you can change logo for pages , categories , posts, etc if you know something about conditional phrases in wordpress.
a single post got a categorie – if you like to change all logos for single post with a given category use
add_filter('avf_logo','av_change_logo_for_categories'); function av_change_logo_for_categories($logo){ if( is_single() && in_category( 'slider1' ) ) { $logo = "https://webers-testseite.de/wp-content/uploads/layerslider/Parallax-Slider/truc.png"; } return $logo; }
you can modify this with a lot of elseif rules and for pages , page arrays etc. pp like:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo){ if( is_page(21) ) { $logo = "http://www.domain.com/wp-content/uploads/logo21.jpg"; } elseif ( is_page( array( 42, 54, 6 ) ) ) { $logo = "http://www.domain.com/wp-content/uploads/logo22.jpg"; } elseif ( is_category( 'slider1' ) ) { $logo = "http://www.domain.com/wp-content/uploads/logo23.jpg"; } elseif( is_single() && in_category( 'slider1' ) ) { $logo = "http://www.domain.com/wp-content/uploads/logo24.jpg"; } return $logo; }
all single posts with category: slider1 will get logo24
if you got a list of posts of category slider1 ( has_category) logo23July 23, 2018 at 8:25 am in reply to: Transparent header – with sticky submenu – between 768 and 990 px #988607See here aswell: https://kriesi.at/themes/enfold-2017/elements/sub-menus/
so calculation of position top is ok for normal screen width – but on mobile ( if choosen to have Menu Items for mobile on 990px) this is not correct.
Give to the testimonial-wrapper a min-height – so that biggest Testimonial fits in to that container.
You will not solve that problem for all screen-width ( the small ones are the problem) – but for a normal screen width this will work:
Please adjust the min-height to your testimonials – the thing is that the short testimonials.avia-testimonial-wrapper { min-height: 350px; margin: 0; }
the min-height value should be in this way that even the biggest testimonial has enough place to show.
a fixed height that will work even for small screens ( maybe a normal 3 liner will turn under this circumstances in a 6 liner testimonial) looks ugly.-
This reply was modified 6 years, 7 months ago by
Guenni007.
-
This reply was modified 6 years, 7 months ago by
-
AuthorPosts