-
Search Results
-
Hi
I know this topic has been discussed already but the solution is not working for us.
Issue: We have a full screen slider on the start page and this is not scaling on mobile. I read that we have to
turn on Custom CSS Class field for all ALB Elements by adding “add_theme_support(‘avia_template_builder_custom_css’);” Afterwards in the custom CSS we can enable/disable desktop and mobile.The issue is that already by changing the custom CSS we receive an error message “Fatal error …. ”
We want to add to the START page.
Can help updating the functions.php and advice what are the next steps to show an alternative image for mobile?
Thanks,
BernhardI’ve got a custom element in the Avia Layout Builder that I’m needing to add link text to.
Meaning that every time a link is added, I’d like “Know More” text to display under the description.
Can anyone give me a hand?
Thanks!!
The current code for the custom block is:<?php /** * Slider * Shortcode that allows to slide some content */ if (!class_exists('avia_sc_offerings_blocks')) { class avia_sc_offerings_blocks extends aviaShortcodeTemplate { /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['name'] = __('Offerings Block', 'avia_framework'); $this->config['tab'] = __('Custom Blocks', 'avia_framework'); $this->config['icon'] = AviaBuilder::$path['imagesURL'] . "sc-contentslider.png"; $this->config['order'] = 83; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'av_offerings_block'; $this->config['shortcode_nested'] = array('avia_offerings_block'); $this->config['tooltip'] = __('Display a content slider element', 'avia_framework'); } /** * Popup Elements * * If this function is defined in a child class the element automatically gets an edit button, that, when pressed * opens a modal window that allows to edit the element properties * * @return void */ function popup_elements() { $this->elements = array( array( "type" => "tab_container", 'nodescription' => true ), array( "type" => "tab", "name" => __("Content", 'avia_framework'), 'nodescription' => true ), array( "name" => __("Add/Edit Blocks", 'avia_framework'), "desc" => __("Here you can add, remove and edit the blocks you want to display.", 'avia_framework'), "type" => "modal_group", "id" => "content", "modal_title" => __("Edit Form Element", 'avia_framework'), "std" => array( array('title' => __('Block 1', 'avia_framework'), 'tags' => '') ), 'subelements' => array( array( "name" => __("Block Title", 'avia_framework'), "desc" => __("Enter the block title here (Better keep it short)", 'avia_framework'), "id" => "title", "std" => "Block Title", "type" => "input"), array( "name" => __("Title Link?", 'avia_framework'), "desc" => __("Where should your title link to?", 'avia_framework'), "id" => "link", "type" => "linkpicker", "fetchTMPL" => true, "std" => "", "subtype" => array( __('No Link', 'avia_framework') => '', __('Set Manually', 'avia_framework') => 'manually', __('Single Entry', 'avia_framework') => 'single', __('Taxonomy Overview Page', 'avia_framework') => 'taxonomy', ), "std" => ""), array( "name" => __("Open in new window", 'avia_framework'), "desc" => __("Do you want to open the link in a new window", 'avia_framework'), "id" => "linktarget", "required" => array('link', 'not', ''), "type" => "select", "std" => "", "subtype" => AviaHtmlHelper::linking_options()), array( "name" => __("Description",'avia_framework' ), "desc" => __("Enter description",'avia_framework' ), "id" => "content", "type" => "textarea", "std" => "" ), array( "name" => __("Choose Image", 'avia_framework'), "desc" => __("Either upload a new, or choose an existing image from your media library", 'avia_framework'), "id" => "src", "type" => "image", "title" => __("Insert Image", 'avia_framework'), "button" => __("Insert", 'avia_framework'), "std" => AviaBuilder::$path['imagesURL'] . "placeholder.jpg"), ) ), array( "name" => __("Heading", 'avia_framework'), "desc" => __("Do you want to display a heading above the images?", 'avia_framework'), "id" => "heading", "type" => "input", "std" => "", ), array( "name" => __("CSS ID", 'avia_framework'), "desc" => __("Custom ID for the block container", 'avia_framework'), "id" => "css_id", "type" => "input", "std" => "", ), array( "name" => __("CSS Class", 'avia_framework'), "desc" => __("Custom Class for the block container", 'avia_framework'), "id" => "css_class", "type" => "input", "std" => "", ), array( "type" => "close_div", 'nodescription' => true ), array( "type" => "tab", "name" => __("Colors", 'avia_framework'), 'nodescription' => true ), array( "name" => __("Font Colors", 'avia_framework'), "desc" => __("Either use the themes default colors or apply some custom ones", 'avia_framework'), "id" => "font_color", "type" => "select", "std" => "", "subtype" => array(__('Default', 'avia_framework') => '', __('Define Custom Colors', 'avia_framework') => 'custom'), ), array( "name" => __("Custom Font Color", 'avia_framework'), "desc" => __("Select a custom font color. Leave empty to use the default", 'avia_framework'), "id" => "color", "type" => "colorpicker", "std" => "", "container_class" => 'av_half av_half_first', "required" => array('font_color', 'equals', 'custom') ), array( "type" => "close_div", 'nodescription' => true ), array( "type" => "close_div", 'nodescription' => true ), ); } /** * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className * * * @param array $params this array holds the default values for $content and $args. * @return $params the return array usually holds an innerHtml key that holds item specific markup. */ function editor_element($params) { $heading = ""; $template = $this->update_template("heading", " - <strong>{{heading}}</strong>"); if (!empty($params['args']['heading'])) $heading = "- <strong>" . $params['args']['heading'] . "</strong>"; $params['innerHtml'] = "<img src='" . $this->config['icon'] . "' title='" . $this->config['name'] . "' />"; $params['innerHtml'].= "<div class='avia-element-label'>" . $this->config['name'] . "</div>"; $params['innerHtml'].= "<div class='avia-element-label' {$template}>" . $heading . "</div>"; return $params; } /** * Editor Sub Element - this function defines the visual appearance of an element that is displayed within a modal window and on click opens its own modal window * Works in the same way as Editor Element * @param array $params this array holds the default values for $content and $args. * @return $params the return array usually holds an innerHtml key that holds item specific markup. */ function editor_sub_element($params) { $template = $this->update_template("title", "{{title}}"); $params['innerHtml'] = ""; $params['innerHtml'] .= "<div class='avia_title_container' {$template}>" . $params['args']['title'] . "</div>"; return $params; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "") { $atts = shortcode_atts(array( 'type' => 'slider', 'autoplay' => 'false', 'animation' => 'fade', 'interval' => 5, 'navigation' => 'arrows', 'heading' => '', 'columns' => 3, "css_id" => "", "css_class" => "", 'handle' => $shortcodename, 'content' => ShortcodeHelper::shortcode2array($content, 1), 'class' => $meta['el_class'], 'custom_markup' => $meta['custom_markup'], 'font_color' => '', 'color' => '', 'styling' => '' ), $atts, $this->config['shortcode']); if ($atts['font_color'] == "custom") { $atts['class'] .= " av_inherit_color"; $atts['styling'] .=!empty($atts['color']) ? " color:" . $atts['color'] . "; " : ""; if ($atts['styling']) $atts['styling'] = " style='" . $atts['styling'] . "'"; } $slider = new avia_offerings_block($atts); return $slider->html(); } } } if (!class_exists('avia_offerings_block')) { class avia_offerings_block { static $slider = 0; //slider count for the current page protected $config; //base config set on initialization function __construct($config) { global $avia_config; $output = ""; $this->config = array_merge(array( 'type' => 'grid', 'autoplay' => 'false', 'animation' => 'fade', 'handle' => '', 'heading' => '', 'navigation' => 'arrows', 'columns' => 3, 'interval' => 5, 'class' => "", 'custom_markup' => "", 'css_id' => "", 'css_class' => "", 'content' => array(), 'styling' => "" ), $config); } public function html() { $output = ""; $counter = 0; avia_offerings_block::$slider++; if (empty($this->config['content'])) return $output; //$html .= empty($this->subslides) ? $this->default_slide() : $this->advanced_slide(); extract($this->config); $columns = 3; $extraClass = 'first'; $slide_loop_count = 1; $loop_counter = 1; $total = $columns % 2 ? "odd" : "even"; $heading = !empty($this->config['heading']) ? '<h2>' . $this->config['heading'] . '</h2>' : " "; $slide_count = count($content); $grid = 'av_one_fifth'; $data = AviaHelper::create_data_string(array('autoplay' => $autoplay, 'interval' => $interval, 'animation' => $animation, 'show_slide_delay' => 30)); $id = 'id="'.$css_id.'"'; $thumb_fallback = ""; $output .= "<div {$id} class='{$css_class} col-centered offerings custom-block' {$styling}>"; $heading_class = ''; if ($navigation == 'no') $heading_class .= ' no-content-slider-navigation '; if ($heading == ' ') $heading_class .= ' no-content-slider-heading '; $output .= "<div class='avia-smallarrow-slider-heading $heading_class'>"; $output .= "<div class='new-special-heading'>" . $heading . "</div>"; $output .= "</div>"; $output .= "<div class='avia-content-slider-inner'>"; foreach ($content as $key => $value) { $link = $linktarget = ""; extract($value['attr']); $link = aviaHelper::get_url($link); $blank = (strpos($linktarget, '_blank') !== false || $linktarget == 'yes') ? ' target="_blank" ' : ""; $blank .= strpos($linktarget, 'nofollow') !== false ? ' rel="nofollow" ' : ""; $parity = $loop_counter % 2 ? 'odd' : 'even'; $last = $slide_count == $slide_loop_count ? " post-entry-last " : ""; $post_class = "post-entry slide-entry-overview slide-loop-{$slide_loop_count} slide-parity-{$parity} {$last}"; if ($loop_counter == 1) $output .= "<div class='block-entry-wrap col-centered'>"; $markup = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'custom_markup' => $custom_markup)); $output .= "<section class='flex_column av_one_third col-centered {$post_class} {$grid} {$extraClass}' $markup>"; $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'custom_markup' => $custom_markup)); if(!empty($src)){ $img = "<img src='".$src."' alt='" . esc_attr($title) . "' />"; } else { $img = "<img src='".AviaBuilder::$path['imagesURL'] . "placeholder.jpg"."' alt='" . esc_attr($title) . "' />"; } if(!empty($link)){ $output .= "<a href='{$link}' $blank title='" . esc_attr($title) . "'>"."<div class='avia_image_container'>{$img}</div>"."</a>"; } else { $output .= "<div class='avia_image_container'>{$img}</div>"; } $output .=!empty($title) ? "<h3 class='slide-entry-title entry-title' $markup>" : ''; $output .= (!empty($link) && !empty($title)) ? "<a href='{$link}' $blank title='" . esc_attr($title) . "'>" . $title . "</a>" : $title; $output .=!empty($title) ? '</h3>' : ''; $markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'custom_markup' => $custom_markup)); $output .=!empty($value['content']) ? "<div class='slide-entry-excerpt entry-content' $markup>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($value['content'])) . "</div>" : ""; $output .= '</section>'; $loop_counter ++; $slide_loop_count ++; $extraClass = ""; if ($loop_counter > $columns) { $loop_counter = 1; $extraClass = 'first'; } if ($loop_counter == 1 || !empty($last)) { $output .="</div>"; } } $output .= "</div>"; $output .= "</div>"; return $output; } } }Thanks!
Hello,
I am not able to assign a custom CSS class to newly created Image Elements via the Avia Layoutbuilder anymore.
It used to work in the past, since I also have image elements with a functioning assigned custom css class on the same layout site, that I have created a month ago or so.
However, it’s still working to assign them to other elements, such as text block for example.My PHP error log shows this:
[14-Aug-2017 13:28:44 UTC] PHP Notice: Undefined index: id in /is/htdocs/wp12827462_8OV8RWT8TN/www.getready.digital/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider.php on line 47
Is it even somehow related to my problem?Debug Information:
Wordpress: 4.8.1.
Enfold Theme: Version: 4.0.7I’ve added two input fields for a custom search function to my page. The first field is an autocomplete plugin, the second one a calendar. Both plugins do create a div with ‘position:absolute’ on the fly.
Now I have z-index problems in two situations and increasing the z-index of these plugin wrappers doesn’t help:
1. First I added a “color section” using the “Avia Layout Architect” and inserted both input fields to it. Below the color section there are many 1/3 boxes containing simple text boxes and buttons simulating the search output. When I click on the input fields, it looks like this:

I’ve tracked down the problem to the CSS ‘unit’ class:
.unit, .units { float: left; display: inline; margin-left: 50px; position: relative; z-index: 1; min-height: 1px; }When I remove the ‘position: relative’ my problem is solved, but I think this will cause problems somewhere else. Is there another solution for this?
2. Situation:
I want to have those two input boxes at the front page on top of the slider, so I’ve added it to the text caption of an aria slider image, but the text caption box has some overflow scroll logic and my position:absolute boxes are truncated:

Is there a way to open up something, that is bigger than the slider caption box and lays above all other content?
Thanks!
Hi,
I would like to have a button that opens a lightbox with some images (a gallery). I read a lot of support posts and came to the conclusion that it’s best to use Magnific Popup functions for that. So I came up with the following.
in my functions.php of my enfold-child theme I added:
wp_enqueue_script('fs-custom-js', get_stylesheet_directory_uri().'/js/custom.js', array('jquery'), null, true); add_theme_support('avia_template_builder_custom_css');to add my custom javascript file and have custom css feature in the ui builder. That works fine.
In my script file I did:
jQuery(document).ready(function( $ ) { $('.fs-gallery-button').magnificPopup({ items: { src: 'link/to/my/image.jpg' }, type: 'image' // this is default type }); });I added the fs-gallery-button class to the button and now if I click it it opens the lightbox image for about 1ms and then some css sets the opacity to 0.
This is just a one image test, but I want to add multiple images (hence a complete gallery) later.I hope you can give me some hints what I’m doing wrong.
PS: I checked the generated html of your lightbox (if used via a masonry gallery) here is the comparison for completeness. First is “my” code second is yours.
<body id="top" class="home page-template-default page page-id-812 logged-in admin-bar stretched roboto open_sans customize-support mfp-zoom-out-cur" itemscope="itemscope" itemtype="https://schema.org/WebPage" style=""> <div class="mfp-bg mfp-ready"></div> <div class="mfp-wrap mfp-close-btn-in mfp-auto-cursor mfp-ready" tabindex="-1" style="overflow-x: hidden; overflow-y: auto;"> <div class="mfp-container mfp-s-ready mfp-image-holder"> <div class="mfp-content"> <div class="mfp-figure"><button title="Close (Esc)" type="button" class="mfp-close">×</button> <figure><img class="mfp-img" src="url/to/image.jpg" style="max-height: 471px;"> <figcaption> <div class="mfp-bottom-bar"> <div class="mfp-title"></div> <div class="mfp-counter"></div> </div> </figcaption> </figure> </div> </div> <div class="mfp-preloader">Loading...</div> </div> </div> </body> <body id="top" class="home page-template-default page page-id-812 logged-in admin-bar stretched roboto open_sans customize-support mfp-zoom-out-cur" itemscope="itemscope" itemtype="https://schema.org/WebPage" style=""> <div class="mfp-bg avia-popup mfp-zoom-in mfp-ready" style="height: 17269px; position: absolute;"></div> <div class="mfp-wrap mfp-gallery mfp-close-btn-in mfp-auto-cursor avia-popup mfp-zoom-in mfp-ready mfp-image-loaded" tabindex="-1" style="top: 11658px; position: absolute; height: 471px;"> <div class="mfp-container mfp-image-holder mfp-s-ready"> <div class="mfp-content"> <div class="mfp-figure"><button title="" type="button" class="mfp-close">×</button> <figure><img class="mfp-img" src="url/to/image.jpg" style="max-height: 471px;"> <figcaption> <div class="mfp-bottom-bar"> <div class="mfp-title">Some Title</div> <div class="mfp-counter">2 / 3</div> </div> </figcaption> </figure> </div> </div> <div class="mfp-preloader"></div><button title="" type="button" class="mfp-arrow mfp-arrow-left mfp-prevent-close"></button><button title="" type="button" class="mfp-arrow mfp-arrow-right mfp-prevent-close"></button></div> </div> </body>Hi Kriesi,
Currently, when one writes a description for a category (wp-admin > WC > Edit Category), any html or css is stripped from the description field.
I see by viewing the source of a Woo Commerce product archive page that currently the description defaults to a paragraph inside H1 tags, such as
<div id="av_product_description" class="avia-section main_color avia-section-large avia-no-border-styling avia-full-stretch av-parallax-section av-section-color-overlay-active avia-bg-style-parallax container_wrap fullsize" data-section-bg-repeat="stretch" style='color:#dd3333;'><div class="av-parallax avia-full-stretch" data-avia-parallax-ratio="0.3"><div class="av-parallax-inner av-parallax-woo" style="background-image: url(https://domain/wp-content/uploads/image.png); main_color background-attachment: scroll; background-position: 50% 50%; background-repeat: no-repeat;"></div></div><div class="av-section-color-overlay-wrap"> <div class="av-section-color-overlay" style="opacity: 0.5; background-color: #ffffff; "></div> <div class="container"><main class="template-page content av-content-full alpha units"><h1><p>This is a description of this category. This is a description of this category. This is a description of this category.</p> </h1></main></div></div></div>My question is: is there a way to (1) remove the <h1> and <p> markup, while (2) also allowing the description field in wp-admin > WC > Edit Category to accept new html or css markup without removing it upon saving? I would just like to this area to be more flexible by adding custom styles and layout.
Thanks!
I have the following css code in my child theme style.css:
.epx-smooth_image { image-rendering: auto !important; }I set epx-smooth_image as Custom Css Class for image but as a result I see only
<div class="avia-image-container-inner"><img class="avia_image " ... ></div>I’ve tried to put css class to quick css but the result is just the same.
What am I doing wrong or is there a bug in theme code?
Hello
My page is below, in the private area. I have looked at lots of posts and tried the css below. I have added the class ttDescr to just the first hotspot, which is the top left. Its supposed to be centered text, not justified, and it should also have a tight line height and be bold but for some reason these are not being applied. Please advise and thanks in advance!
.av-hotspot-container .av-image-hotspot_inner { text-align: center; } /* hotspot tooltip hover */ .avia-tooltip .avia-arrow { display: none; } .avia-tooltip { /* dk grey */ background: rgba(51, 51, 51, 1) !important; border: solid 1px #fff !important; } /* custom class to style text */ .ttDescr { font-size: 14px !important; line-height: 14px !important; color: #fff !important; font-style: normal; font-weight: bold; text-align: center !important; }





