Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • 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?


    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()
            get_stylesheet_directory_uri() . '/js/vendor.js',
    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.

    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;


    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");

    Thanks again

    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>

    Or modifying that function you shared 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

    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.


    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.

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