Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: Sub logo not updated with avf_logo hook #1437439

    Scratch that, I found some other header styles I have which mess with the opacity, so I would imagine my issue relates to that and your code probably works fine.

    Thanks again

    in reply to: Sub logo not updated with avf_logo hook #1437438

    Hi @Guenni007

    I really appreciate your detailed response. I however tried all of your solutions with no luck:

    function av_change_logo($logo){
        if(is_page(3597)) {
            $logo = 3951;  // ID of the svg Logo
        }
        return $logo;
        }
    add_filter('avf_logo', 'av_change_logo');
    
    function av_change_alt_logo_img($header){
        if (is_page(3597)) {
                $header['header_class'] .= ' av_header--about';
                $header['header_replacement_logo'] = 3951;
            }
        return $header; 
        }
    add_filter('avf_header_setting_filter','av_change_alt_logo_img');

    Still only the first SVG in the “logo avia-svg-logo” was updated, not the logo in “subtext avia-svg-logo-sub”, although not ideal, I have since achieved what I was after using the header_class and CSS:

    .av_header--about {
        .avia-svg-logo-sub {
            opacity: 0;
        }
        svg {
            opacity: 1 !important;
        }
    
        &:not(.av_header_transparency) {
            svg {
                path {
                    fill: #4e4e4e;
                }
            }
        }
    }

    Thanks all the same
    Sean

    in reply to: Custom post type archive page conflict #1401371

    Resolved myself, to remove the conflict, set has_archive to false and you can maintain the slug by keeping ‘rewrite’ => array(‘slug’ => ‘careers’) as is.

    in reply to: Custom post type archive page conflict #1401125

    Hi Support,

    Kindly just chasing this topic up, do you have a solution to the above?

    Thanks
    Sean

    in reply to: Initialise slider #1400331

    Hi Mike,

    Wow, thank you so much for your detailed and informative response. That approach will definitely come in handy.

    I ended up going down the slick.js approach, I have the slick js script in my vendor file which I pull in via my functions file:

    function vendor_scripts()
    {
        wp_enqueue_script(
            'vendor',
            get_stylesheet_directory_uri() . '/js/vendor.js',
            array('jquery'),
            time()
        );
    }
    add_action('wp_enqueue_scripts', 'vendor_scripts');

    And then in my main.js file I am targeting a custom class and the wrapper around the columns, slick comes with responsive options too so I can tell it to uninitalise above 768px with unslick:

    $('.featuredboxes .entry-content-wrapper').slick({
                mobileFirst: true,
                dots: true,
                arrows: false,
                responsive: [
                    {
                        breakpoint: 768,
                        settings: "unslick",
                     }
                ]
            });

    Thought I would include my code incase anyone else wanted to take this approach also.

    Thanks again Mike it’s greatly appreciated.
    Sean

    Hi Nikko,

    Thank you so much for this code snippet that has worked just as I wanted.

    Is there a way to modify that function to output a class to the a tag including the category name in it? so it outputs from this:

    <span class="blog-categories minor-meta"><a href="/announcement/" rel="tag">Announcement</a>, <a href="/events/" rel="tag">Events</a> </span>

    to this:

    <span class="blog-categories minor-meta"><a class="announcement" href="/announcement/" rel="tag">Announcement</a>, <a class="events" href="/events/" rel="tag">Events</a> </span>

    Currently, I am targeting the href to style this component, but would rather a class, no biggie if not :)

    a[href="/events/"] {
                        background-color: #1E65A7;
                    }

    Thanks
    Sean

    in reply to: Custom masonry gallery layout #1399659

    Hi Nikko,

    Absolute legend! :) Thank you so much for your help, modified and placed it into my JS file if it is useful for anyone else:

    const firstImage = document.querySelector('#top .gallery .av-masonry-container > a:nth-child(2)');
            const thirdImage = document.querySelector('#top .gallery .av-masonry-container > a:nth-child(4)');
            const fifthImage = document.querySelector('#top .gallery .av-masonry-container > a:nth-child(6)');
            const sixthImage = document.querySelector('#top .gallery .av-masonry-container > a:nth-child(7)');
    
            firstImage.classList.add("av-landscape-img", "av-portrait-img");
            thirdImage.classList.add("av-portrait-img");
            fifthImage.classList.add("av-landscape-img");
            sixthImage.classList.add("av-portrait-img");

    Thanks again
    Sean

    in reply to: Custom masonry gallery layout #1399524

    Hi Nikko,

    Thank you for getting back to me.

    All of my images are 1000 x 1000px, for the first item I created an image 2000 x 2000px (2 times bigger) which didn’t change in height or width. I figured out that creating an image at 16:9 will take up 2 column spaces wide but obviously not in height and 9:16 will take up 2 columns spaces in height but not in width. Still don’t have a solution that takes up 2 column spaces both in height and width.

    I think this approach is too hit-and-miss for what I am trying to achieve, as well as the lightbox image then presenting the image at that cropped size, where it would be better if it displayed the full uncropped image.

    What other options do I have? I don’t want to add a third-party plugin.

    Can I modify the masonry_gallery.php in a way where I can specify my own HTML? that way I can create the layout without modifying the size of the images.

    <div class="grid">
      <div class="grid-item">...</div>
      <div class="grid-item grid-item--width2">...</div>
      <div class="grid-item">...</div>
      ...
    </div>

    Or modifying that function you shared https://kriesi.at/support/topic/change-image-size-on-masonry-gallery/ here to achieve my layout?

    My only other thought to achieve this is to create a custom element in my shortcodes folder and have the user input images in Advanced Custom Fields.

    Your help would be greatly appreciated.

    Thanks in advance
    Sean

    in reply to: Custom template part and custom element template (CET) #1397145

    Hi Ismael,

    Thanks for getting back to me and apologies that my topic wasn’t well explained. I’ll try and rephrase:

    I am trying to create a custom element in the “/config-templatebuilder/avia-shortcodes/” I am after a PHP file that only includes the required code to output some basic HTML.

    For example, I have taken the hr.php file (“/config-templatebuilder/avia-shortcodes/hr/hr.php”) assuming that would be one of the components with the least amount of code, and removed the following functions:

    Line 59: popup_elements()
    Line 138: register_dynamic_templates()
    Line 329: get_element_styles()

    I then created the following directory in my child theme “/config-templatebuilder/avia-shortcodes/custom/” and renamed and saved the hr.php file as custom.php to this directory.

    You may mention that some of the above functions are required for the component to output correctly. I assume shortcode_insert_button(), editor_element( $params ) and shortcode_handler( $atts, $content = ”, $shortcodename = ”, $meta = ” ) are required?

    I’m after a minimal starting component file that I can work from to create custom components at (“/config-templatebuilder/avia-shortcodes/”) rather than modifying/overwriting existing ones using my child theme.

    I hope that makes sense.

    Thanks
    Sean

    in reply to: Increase output of cross-sells on the basket page above 4 #1326461

    Hi Ismael,

    Thank you for your quick response.

    add_filter('woocommerce_cross_sells_total', 'avia_woocommerce_cross_sale_count');
    add_filter('woocommerce_cross_sells_columns', 'avia_woocommerce_cross_sale_count');
    
    function avia_woocommerce_cross_sale_count($count)
    {
    	return 4;
    }

    I found the above code in the config-woocommerce file as you mentioned which changing the return value to 12 solves my issue.

    My question now is perhaps the code in the functions could be changed to target that value? Something like:

       add_action("after_setup_theme", function() {
    	global $avia_config;
    	$avia_config['woocommerce_cross_sells_total'] = 12;			// columns for related products and upsells
    	$avia_config['woocommerce_cross_sells_columns'] = 12;	// number of items for related products and upsells
    }, 10, 1);

    The function didn’t work but you may have a better idea as to what it should be changed to.

    Alternatively, is there a way I can include the wp-content/themes/enfold/config-woocommerce/config.php file in my child theme as an override?

    Thank you for your help.
    Sean

    This reply has been marked as private.
Viewing 11 posts - 1 through 11 (of 11 total)