Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Masonry Gallery custom class not working #910238

    Here is the solution:

    ## Step 1
    enfold\config-templatebuilder\avia-shortcodes\masonry_entries.php
    ### Find:
    $masonry = new avia_masonry($atts);
    ### Replace:
    $atts[‘custom_class’] = $meta[‘custom_class’];
    $masonry = new avia_masonry($atts);

    ## Step 2
    enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php
    ### Find:
    ‘custom_bg’ => ”,
    ### Replace:
    ‘custom_bg’ => ”,
    ‘custom_class’ => ”,

    ## Step 3
    enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php
    ### Find:
    $orientation = $this->atts[‘size’] == “fixed” ? $this->atts[‘orientation’] : “”;
    ### Replace:
    $orientation = $this->atts[‘size’] == “fixed” ? $this->atts[‘orientation’] : “”;
    $custom_class = ”;
    if(isset($this->atts[‘custom_class’])) {
    $custom_class = $this->atts[‘custom_class’];
    }

    ## Step 4
    enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php
    ### Find:
    $output .= “<div id=’av-masonry-“.self::$element.”‘ class=’av-masonry noHover av-{$size}-size av-{$this->atts[‘gap’]}-gap av-hover-overlay-{$this->atts[‘overlay_fx’]} av-masonry-col-{$this->atts[‘columns’]} av-caption-{$this->atts[‘caption_display’]} av-caption-style-{$this->atts[‘caption_styling’]} {$this->atts[‘container_class’]} {$orientation} {$av_display_classes} {$av_column_classes}’ {$style} >”;
    ### Replace
    $output .= “<div id=’av-masonry-“.self::$element.”‘ class=’av-masonry {$custom_class} noHover av-{$size}-size av-{$this->atts[‘gap’]}-gap av-hover-overlay-{$this->atts[‘overlay_fx’]} av-masonry-col-{$this->atts[‘columns’]} av-caption-{$this->atts[‘caption_display’]} av-caption-style-{$this->atts[‘caption_styling’]} {$this->atts[‘container_class’]} {$orientation} {$av_display_classes} {$av_column_classes}’ {$style} >”;

    I think this should be in the feature fixes.

    Thanks.

    • This reply was modified 6 years, 8 months ago by hayatbiralem. Reason: Added mising step

    By the way, I also remove tag.php archive with following code, so I use archive.php for all archives:

    function my_template_override($template)
    {
        global $wp_query;
    
        if($wp_query->is_tag) {
            return locate_template('archive.php');
        }
    
        return $template;
    }
    add_filter('template_include', 'my_template_override');

    Hope this helps,
    thanks.

    Hi Ismael,

    Thansk for the tip but there is an issue on the avia_masonry_query_func: your code are not covers the tag, the date and the custom tax archives.

    Also give an error on the masonry elements in the posts or the pages.

    Following code just simple and it covers all of that cases:

    add_filter( 'avia_masonry_entries_query', 'my_avia_masonry_query_func', 10, 2);
    function my_avia_masonry_query_func( $query, $params ) {
        if(!is_archive()) return $query;
    
        global $wp_query;
        return $wp_query->query;
    }

    Hope this helps anyone like me :)

    in reply to: Using masonry layout on category and tag archives #793916

    Thanks Ismael, it works like a charm :)

    in reply to: Custom ID for Layout Elements (continue) #789064

    Thanks :)

    in reply to: How can I add shortcode content to the header? #739693

    Sorry! My last two comments belongs to this topic:
    https://kriesi.at/support/topic/custom-shortcode-in-special-headingheading-text/

    Very sorry.

    in reply to: How can I add shortcode content to the header? #739692

    I found another solutions but we need some hack for that.

    Go to enfold\config-templatebuilder\avia-shortcodes\heading.php

    Find if($heading)

    Replace:

    if( empty($heading) && ! empty($content) ) {
        $heading = do_shortcode($content);
    }
    
    if($heading)

    And use “Text Block” component with this shortcodes:

    [av_heading tag='h1' padding='10' heading='' color='custom-color-heading' style='blockquote modern-quote' custom_font='#ffffff' size='40' subheading_active='' subheading_size='30' custom_class=''][post_title][/av_heading]

    If the enfold team will use the heading value as content in the future, rather than as an attribute, we can also use the custom heading component directly like this: [post_title]

    in reply to: How can I add shortcode content to the header? #739683

    Hi,

    I solved my problem with “Code Block” component. Check “Deactivate schema.org markup” option.

    Example code here:

    <div style="padding-bottom:10px;color:#ffffff;font-size:40px;" class="av-special-heading av-special-heading-h1 custom-color-heading blockquote modern-quote  avia-builder-el-6  el_before_av_textblock  avia-builder-el-first   av-inherit-size">
        <h1 class="av-special-heading-tag" itemprop="headline">
            [post_title]
        </h1>
    </div>

    Hope this helps.

    • This reply was modified 7 years, 8 months ago by hayatbiralem.
Viewing 8 posts - 1 through 8 (of 8 total)