Forum Replies Created
-
AuthorPosts
-
should it be prevented for real mobile devices or for small screen sizes?
If it is for small screen sizes is only to avoid ? it must respond to resize?the first only hides it (sets it to display: none), but it remains in the DOM – the second removes these containers. Nevertheless, the adjustment of the css (especially the padding-top) must still be done.
did you check the docu link?
i noted a different snippet on including a CPT to Advanced Layout Builder –
i can not test it here – i haven’t installed “The Events Calendar”try :
add_filter('avf_builder_boxes','enable_boxes_on_tribeevents'); function enable_boxes_on_tribeevents($boxes) { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('tribe_events'), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('tribe_events'), 'context'=>'side', 'priority'=>'low'); return $boxes; }
________
Edit: it seem to be an older (deprecated) snippet – see docu on that:
https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type
i guess “YOUR CUSTOM POST NAME” is a bit confusing and i suppose that it is for tribe events: tribe_eventsyes you are right – it is a little bit a strange translation of header layout – sounds like it is only belonging to titles.
Intestazione is ok for header – but that header layout is in “Layout Titolo” and on the right side you see “Dimensione Titolo”______
sì hai ragione – è un po’ una strana traduzione del layout di intestazione – sembra che appartenga solo ai titoli.
“Intestazione” è ok per l’intestazione – ma quel layout di intestazione è in “Layout Titolo” e sul lato destro si vede “Dimensione Titolo”Not for that –
maybe you change from.hide() to .remove()
that is somehow a matter of tasteif you like to have no sidebar on the iframe replace that part above that checks if frame or not with:
if (top === self) { // no frame } else { //frame $('#header, #footer, #socket, .sidebar').hide(); $('#main').attr('style', 'padding-top: 0px !important'); $('.container .av-content-small').css('width', '100%'); $('.content').css('border-right', 'none'); };
and if you like to have the link of the concerning categorie aswell open in a lightbox – extend the selectors to:
$('.open-in-lightbox a.slide-image, .open-in-lightbox .blog-categories > a, .open-in-lightbox .slide-entry-title > a').magnificPopup({
try:
function posts_iframe_popup() { ?> <script type="text/javascript"> (function($) { if (top === self) { // no frame } else { //frame $('#header, #footer, #socket').hide(); $('#main').attr('style', 'padding-top: 0px !important'); }; $(window).on('load', function(){ $('.open-in-lightbox a.av-masonry-entry').magnificPopup({ type:'iframe', mainClass: 'spezial-masonries', }); $('.open-in-lightbox a.slide-image, .open-in-lightbox .slide-entry-title > a').magnificPopup({ type:'iframe', mainClass: 'spezial-blogposts', }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'posts_iframe_popup');
see testpage: https://webers-testseite.de/lightboxes/
January 27, 2022 at 7:11 pm in reply to: H1 – H6 do not show font changes and Body font size – Enfold 4.8.9 and WP 5.9 #1337570i gave to the alb element itself a custom-class ( in my case ) : open-in-lightbox
then i put this to child-theme functions.php:
function posts_iframe_popup() { ?> <script type="text/javascript"> (function($) { $(window).on('load', function(){ $('.open-in-lightbox a.av-masonry-entry').magnificPopup({ type:'iframe', mainClass: 'spezial-masonries', }); $('.open-in-lightbox a.slide-image, .open-in-lightbox .slide-entry-title > a').magnificPopup({ type:'iframe', mainClass: 'spezial-blogposts', }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'posts_iframe_popup');
the mainClass is only to have a way to select f.e. the iframe-scaler specifically for that usage – you will have that class on mfp-wrap container.
to have the links from both ( the image and the slide title – we have in that rule two selectors).PS : on that blog-posts the first link “iframe-lightbox” leads to an iframe which can open a new iframe on top :lol:
you can see here on top of that page a masonry with portfolio links.
If you click to open it – it will open that portfolio in a lightbox ( but the complete page )
https://webers-testseite.de/lightboxes/
Is it the way you like to have it?show me a test page where you like to open those links in a lightbox.
is it a page like this:
https://kriesi.at/themes/enfold-2017/elements/blog-posts/
or
https://kriesi.at/themes/enfold-2017/blog/blog-default/
And you want to open not the posts on a new page but as iframe in a lightbox?i can see the animation too. ( Firefox, Safari, Chrome on OSX )
there is one thing to mention : if your screen is bigger than the image size – the animation stops.
maybe you setup a background-size to that section f.e. : background-size: 110%hm – i thougt you prefered the position next to search icon – ok.
is it you want to have on all archives – that posts and events are together ?
Maybe you can use the hook : pre_get_posts to include the tribe_events to post
and have you enabled the tribe-events for advanced layout builder – or is it now default behavior?i do not use the Tribe Events – so i got no experience with it – and i can not test this!
for the conditionl tags you might add the !is_admin() – see: https://developer.wordpress.org/reference/hooks/pre_get_posts/
… i do not find yet a solution
or place that link in the menu as f.e.: individual Link and give that class to the item: menu-item-avia-special
you can choose the option: button style here aswell.
Nice advantage is: if the burger-menu is opened – the button stayes on top like the burger icon.But i think today this limitation is now deprecated: https://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157
after menu-item-1988 – there is a semicolon – that is not right ! ( If you got more selectors in front of that rule they are separated by commata )
so remove that semicolon:.page-id-1500 #menu-item-1988 { display: none !important; }
If it has only styling reasons (appearance of a h3), then the way over the jQuery Script above would be the easiest variant. You would give the Accordion a custom class and adjust the selector in the script accordingly.
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('.h2titles p.toggler', '<h2></h2>'); replaceElementTag('.h3titles p.toggler', '<h3></h3>'); }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
here with custom class; h2titles and h3titles
see: https://webers-web.info/toggles/Correct – then let me know if everything worked.
Yes it is – but do not forget to place the code above in your child-theme functions.php: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
well try to create your own keyframe animation.
At the end f.e. a kenburns effect is nothing else than that. see: https://codepen.io/SaijoGeorge/pen/LxeGgYso to better select the color-section – give a unique ID or custom-class to it – in my test page it is: animated-background as class.
a slide from left to right and back is f.e:.avia-section.animated-background { animation: anime 60s linear infinite; } @keyframes anime { 0% { background-position:0% 50% } 50% { background-position:100% 50% } 100% { background-position:0% 50% } }
(see link to codepen – and add the other browser fixes too ( -webkit seems to be the most important now ) )
see: https://webers-web.info/moving-background/there is a jQuery solution on that – this in child-theme functions.php will do that job too:
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('p.toggler', '<h3></h3>'); }(jQuery)); </script> <?php } add_action('wp_footer', 'replace_tags_with_tags');
– but on SEO reasons i would prefer not to replace the tags after page load, and take the first solution
you find that file in: enfold/config-templatebuilder/avia-shortcodes/toggles.php
open it on you desktop pc with a good texteditor ( ;) not word ) ( notepad++ or sublime text for mac osx)
find all p.toggler and replace them with f.e.: h3.toggler
find that code above and replace p with h3 ( don’t forget the closing tag )
save that edited alb element on your desktop pc.Now:
to have child-theme substitutes for enfold alb elements – create a subfolder on your enfold installation via ftp named : shortcodes
upload to that subfolder the toggles.php file
and put this to your child theme functions.php:
function avia_include_shortcode_template($paths){ $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; } add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
see documentation of enfold: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
this is the way you can replace every alb element by a child-theme alb.
you can see and download the toggles.php with h3 toggle-titles from here: https://pastebin.com/uyJAY2da
see: https://webers-web.info/testseite/#h3-titlefirstly, your page is easy to find based on the screenshot, so can you please include the link to this test page here?
on the other hand, based on your headline, it is not clear to me what you want to achieve with the small plugin. This plugin only allows you to use special characters that are actually used for tags in the content.
The “PADI IDC Thailand Koh Lanta – …” seems to be a heading in front of a toggle Element. So how did you insert this. Is it a heading element?
If so – you can change the tag to h2 in the element itself ( Heading Type ).
the toggle Titles are on default p-tags – but could be changed to f.e. h3 on the alb element itself (toggles.php) and have a child-theme toggles.php to achieve this.
but be careful – it is not only those lines here:
but also then all p.toggler in f.e. selectors array on lines 897ff.If you only want to have h2 / h3 headings in your content – just choose it from here:
this here is a temporarly remove of the title tag
you must adopt your selector to what you need ! ( var links )function temporary_removal_title_tags(){ ?> <script> window.onload = function() { //var links = document.querySelectorAll('a,img,div[title]'); var links = document.getElementsByTagName("img"); for (var i = 0; i < links.length; i++) { var link = links[i]; link.onmouseover = function() { this.setAttribute("org_title", this.title); this.title = ""; }; link.onmouseout = function() { this.title = this.getAttribute("org_title"); }; link.onclick = function() { this.title = this.getAttribute("org_title"); }; } }; </script> <?php } add_action('wp_footer', 'temporary_removal_title_tags');
you see what the code does: it saves the original title to another attribute : org_title
now if the mouse hovers – the title is empty but the original title is saved to another attribute.
if you leave it ( mouseout ) the title is there again.
And on click the title will be there for lightbox captions.
the code above is only for images – but you see the commented line – you can have more selctors here.
you can use the selectors Nikko mentioned above.See in action here with the enfold tooltip on the images: https://webers-testseite.de/gallery-with-8-images/
normal behavior is here on Gallery with preview ( hove the thumbnails ): https://kriesi.at/themes/enfold-2017/elements/gallery/there will be both : enfold tooltip and browser tooltip by titles
-
This reply was modified 3 years, 6 months ago by
Guenni007.
Yes the selector to insert the svg with the use instruction had to be changed.
– but it might be best to see the real site for better advice – if you do not like to make it public – send me an e-mail with link.
All info on avatar or nickOn Enfold Options: Header > Header Style choose: minimal…
i have changed the way of your example page a little bit, because i don’t think it makes sense to paint over the stroke with another ( 2nd child) either.
You can see it here how I implemented it in Enfold. : https://webers-web.info
Basic idea is that there is an omnipresent svg on the page, and this is used for the menu underscore.
To have the svg always available on all pages:
( to child-theme functions.php ):add_action('ava_after_body_opening_tag', function() { echo '<svg id="stroke" xmlns="http://www.w3.org/2000/svg" width="0" height="0"><defs><path id="line" d="M2 2c49.7 2.6 100 3.1 150 1.7-46.5 2-93 4.4-139.2 7.3 45.2-1.5 90.6-1.8 135.8-.6" fill="none" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke"/></defs></svg>'; });
and like on the codepen page also in the menu item now set a svg which uses the path of the omnipresent svg:
( under the code above in child-theme functions.php ):function insert_svg_to_main_navigation() { ?> <script> (function($){ $('#avia-menu li.menu-item-top-level a' ).prepend('<svg class="button-stroke" viewBox="0 0 154 13"><use href="#line"></use></svg>'); })(jQuery); </script> <?php } add_action('wp_footer', 'insert_svg_to_main_navigation');
the rest is quick css:
body > #stroke, #av-burger-menu-ul svg.button-stroke { display: none; } .button-stroke { display: block; width: calc(100% - 10px); height: 20px; position: absolute; left: 5px; top: calc(50% + 15px); stroke-width: 2; stroke-dasharray: 650; stroke-dashoffset: 650; } #avia-menu li.current-menu-item > a .button-stroke { stroke-dashoffset: 0; stroke: #9b0000; /*** it is up to you if and what color the active state of the menu-item is set here ***/ } #avia-menu li.menu-item-top-level a:hover .button-stroke { stroke: #07a; /*** the hover color of the stroke ***/ -webkit-animation-duration: 2s; animation-duration: 2s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-name: draw; animation-name: draw; } @-webkit-keyframes draw { 100% { stroke-dashoffset: 0; } } @keyframes draw { 100% { stroke-dashoffset: 0; } }
you see some parameters you can play with – f.e. stroke width or colors
___________
with this way you should now be able to – animate your own paths as well.
You need the paththat part in the first code above
<path id=”line” d=”M2 2c49.7 2.6 100 3.1 150 1.7-46.5 2-93 4.4-139.2 7.3 45.2-1.5 90.6-1.8 135.8-.6″ fill=”none” stroke-linecap=”round” stroke-linejoin=”round” vector-effect=”non-scaling-stroke”/>you can create it f.e. in Illustrator, and the path length for the stroke-dasharray and stroke-dashoffset. By the way, you can determine the path length in Illustrator by selecting the path, then in the menu item Window – Document information – and then in the “hamburger” select objects. ( you need the value in px not in mm )
-
This reply was modified 3 years, 6 months ago by
-
AuthorPosts