Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #819231

    Hey at all,

    I’ve tried to add a custom class to the Masonry Gallery element in ALB to change the title color for specific pages, but it doesn’t work.
    Please find an example page and login credentials in the private section.
    I’ve already used custom classes on other elements where they worked fine.

    As an alternative, I would be happy with a code which just changes the title font color of the masonry element entries when the title is displayed over the image and not below.

    Best regards,
    Hella

    #819416

    Hey Hella,

    We have released Enfold 4.1 today and it has many improvements. Please see change log here – http://kriesi.at/documentation/enfold/enfold-changelog/ and update the theme to the latest version – http://kriesi.at/documentation/enfold/updating-your-theme-files/. Please also see – https://kriesi.at/support/topic/enfold-version-4-1-update-troubles/

    Best regards,
    Yigit

    #821090

    Dear Yigit,
    thanks for your reply. Meanwhile I have updated the theme files, but nothing has changed.
    I can add a css class name to the masonry element as before (following the tutorial on this post), but the class is not assigned to the masonry element, when I look at the source code of the page in the frontend.
    screenshot 1, screenshot 2

    Regards,
    Hella

    • This reply was modified 7 years, 4 months ago by come_paglia.
    #821249

    Hi Hella,

    Masonry gets a class or an id when it is outside containers, I added the cloned copy at the bottom, outside other containers and it got the class and the id specified in the settings. So if you take it out of that 1/1 container, it will have the class you need.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #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, 9 months ago by hayatbiralem. Reason: Added mising step
    #910481

    Hi hayatbiralem,

    Thanks a lot for sharing! Much appreciated :-)

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.