Viewing 30 results - 811 through 840 (of 16,890 total)
  • Author
    Search Results
  • #1438550
    Davey
    Guest

    There is a fatal error in the latest version of Enfold. Occuring when using the [av_upcoming_events items='2'] shortcode in the footer on category archive pages:

    Fatal error</b>: Uncaught Error: Attempt to assign property “ID” on null in /home/websitehere2/domains/websitehere.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/events_upcoming/events_upcoming.php:398
    Stack trace:
    #0 /home/websitehere2/domains/websitehere.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-template.php(1332): avia_sc_upcoming_events->shortcode_handler()
    #1 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/shortcodes.php(433): aviaShortcodeTemplate->shortcode_handler_prepare()
    #2 [internal function]: do_shortcode_tag()
    #3 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #4 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/class-wp-hook.php(326): do_shortcode()
    #5 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #6 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/widgets/class-wp-widget-custom-html.php(150): apply_filters()
    #7 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/class-wp-widget.php(394): WP_Widget_Custom_HTML->widget()
    #8 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/widgets.php(837): WP_Widget->display_callback()
    #9 /home/websitehere2/domains/websitehere.com/public_html/wp-content/themes/enfold/footer.php(180): dynamic_sidebar()
    #10 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/template.php(790): require_once(‘…’)
    #11 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/template.php(725): load_template()
    #12 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/general-template.php(92): locate_template()
    #13 /home/websitehere2/domains/websitehere.com/public_html/wp-content/themes/enfold/archive.php(130): get_footer()
    #14 /home/websitehere2/domains/websitehere.com/public_html/wp-includes/template-loader.php(106): include(‘…’)
    #15 /home/websitehere2/domains/websitehere.com/public_html/wp-blog-header.php(19): require_once(‘…’)
    #16 /home/websitehere2/domains/websitehere.com/public_html/index.php(17): require(‘…’)

    Please fix this asap

    Hi,
    I believe that you misunderstand, if you want to use your button tag then you don’t need the jQuery I posted above, just add this to your page in a code block element:
    <button type="button" onclick="window.history.back()">Click me</button>
    If you want to use the button element, as above, just follow those steps:
    Add a button to a page with the custom classes back menu-item
    then add this to your functions.php:

    function custom_script() { ?>
      <script>(function($){
      $(".back.menu-item a").attr("onclick", "window.history.back()");
    })(jQuery);
    </script>
      <?php
    }
    add_action( 'wp_footer', 'custom_script', 99 );

    Don’t do both, and don’t use the plugin.
    If you still have trouble please include an admin login in the Private Content area so we can add this for you.

    Best regards,
    Mike

    marathontriad
    Participant

    This is the 2nd hosting environment in which I am experiencing this error. The first was GoDaddy and was nearly identical.

    [26-Mar-2024 19:54:20 UTC] PHP Fatal error: Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /chroot/home/a44d976b/7962ae75fb.nxcli.io/html/wp-content/themes/enfold/functions-enfold.php on line 313

    #1438439

    Topic: sorting posts

    in forum Enfold
    rixi
    Participant

    Hi,
    i had a CODE to sort posts per drag and drop in the backend. it was working perfect. Now there came an error when i was working on the page, it said database error, the page was white, didnt load anymore for a moment, was back after a while but the sorting didnt work anymore. It was like it normally is.
    But i need to have the dates beginning by january and ending in december instead of the other way around.
    The normal plugin to drag and drop in the backend wasn`t working.
    You have any idea what i can do? I really need to do it that way.

    Many regards rixi

    <?php
    /* Child theme stylesheet einbinden */
    function child_theme_styles()
    {
    wp_enqueue_style(‘parent-style’, get_template_directory_uri() . ‘/style.css’);
    wp_enqueue_style(‘child-theme-css’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘parent-style’));
    }
    add_action(‘wp_enqueue_scripts’, ‘child_theme_styles’);

    /** adjust the magazine element query **/
    function avf_magazine_entries_query_mod($query, $params)
    {

    if (is_page(817)) {

    $query[‘order’] = ‘ASC’;

    $query[‘orderby’] = ‘menu_order’;
    }

    return $query;
    }

    add_filter(‘avf_magazine_entries_query’, ‘avf_magazine_entries_query_mod’, 10, 2);

    #1438385

    Hi,
    I believe that you are referring to the Widget Navigation Menu,
    Enfold_Support_5176.jpeg
    to add the icons to those menu items add this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    #menu-footer-menu li.menu-item > i ~ a {
    	display: inline-block;
    }
    #menu-footer-menu li.menu-item > i:before {
    	color: #fff;
    }

    Then add this code to the end of your child theme functions.php file in Appearance ▸ Editor, if you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add this code and save. Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    function add_icon_to_widget_menu_items() { ?>
      <script>
    document.addEventListener("DOMContentLoaded", function() {
        const menuItems = document.querySelectorAll('#menu-footer-menu li'); 
        menuItems.forEach(function(item) {
            let classes = item.className.split(/\s+/);
            let iconClass = classes.find(c => c.startsWith('menu-item-icon-'));
            if (iconClass) {
                let iconName = iconClass.replace('menu-item-icon-', '');
                item.innerHTML = '<i class="fa ' + iconName + '"></i> ' + item.innerHTML;
            }
        });
    });
    </script>
      <?php
    }
    add_action( 'wp_footer', 'add_icon_to_widget_menu_items', 99 );

    Enfold_Support_5178.jpeg

    Best regards,
    Mike

    #1438254

    Hey Ismael,
    thanks for your quick reply. The Blog Post Category option in the Enfold > Blog Layout > Blog Meta Elements section is activated, but the blog grid oly has options like “Title and Excerpt” and so on no “Show category”
    Is there an option to insert it in blog.php from line 297 'subtype' => array() where it says:

    						array(
    							'name' 	=> __( 'Define Blog Grid Layout', 'avia_framework' ),
    							'desc' 	=> __( 'Do you want to display a read more link?', 'avia_framework' ),
    							'id' 	=> 'contents',
    							'type' 	=> 'select',
    							'std' 	=> 'excerpt',
    							'lockable'	=> true,
    							'required'	=> array( 'blog_style', 'equals', 'blog-grid' ),
    							'subtype'	=> array(
    												__( 'Title and Excerpt', 'avia_framework' )						=> 'excerpt',
    												__( 'Title and Excerpt + Read More Link', 'avia_framework' )	=> 'excerpt_read_more',
    												__( 'Only Title', 'avia_framework' )							=> 'title',
    												__( 'Only Title + Read More Link', 'avia_framework' )			=> 'title_read_more',
    												__( 'Only excerpt', 'avia_framework' )							=> 'only_excerpt',
    												__( 'Only excerpt + Read More Link', 'avia_framework' )			=> 'only_excerpt_read_more',
    												__( 'No Title and no excerpt', 'avia_framework' )				=> 'no'
    											)
                                )
    
    				);

    or like for post-slider to described in Display post tags on Blog Posts element a function like:

    
    function new_avf_postslider_posts_meta_data_show(){
    	return true;
    }
    add_filter('avf_postslider_posts_meta_data_show', 'new_avf_postslider_posts_meta_data_show');

    Thanks for any hint

    • This reply was modified 2 years ago by gpweb.
    #1438244

    Hey Rocuant,

    Thank you for the inquiry.

    We added this code in the functions.php file to insert the widget area in the header.

    <?php
    
    //--------------------------------
    // Header widget area
    //--------------------------------
    
    add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
        function enfold_customization_header_widget_area() {
        dynamic_sidebar( 'header' );
    }
    

    We then created a custom widget area named “header” in the Appearance > Widgets panel and added a Text widget. To adjust the widget’s position within the header, we added the following code in the Quick CSS field:

    #top #header #header_main .widget {
        position: absolute;
        right: 50%;
        transform: translateX(-50%);
    }

    Please check the documentation below for more info: https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area

    Best regards,
    Ismael

    #1437814
    blaisen
    Participant

    Hello. I followed the instructions here https://kriesi.at/documentation/enfold/header/#toggle-id-4-closed and created a header widget to display a button in the header. Unfortunately you only give instructions/code for logo left | navigation center | widget right. I would like to have the widget next to the navigation on the right side of the header: logo left | widget then navigation right: https://ibb.co/s90t7v4

    Can you please help by sending CSS or a fix to the code on functions.php? Currently:

    add_action( ‘ava_after_main_menu’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    #1437754

    In reply to: Old Theme Versions

    This reply has been marked as private.

    Are you able to influence the trigger? why don’t you use a.avia-button
    or would you like to differentiate which buttons were clicked? In this case, you have to use the generated unique class as a trigger for each button element. f.e. a.av-av_button-60d3b58ef6e39d033d89831f5df0c979 – you can see that on dev tools what unique class is added.

    Next: you can use that custom class on the anchor element itself by having a child-theme buttons.php.
    if you would like to have that solution – you only have to edit that buttons.php to add the {$meta['el_class']} to the anchor too.

    see: https://pastebin.com/jT1B5XJa
    on line 758 i added that class as custom-class-button (which is added on line 764 to the wrapper element)

    disadvantage of this quick change: if two custom classes are assigned – only the last one receives this addendum

    (if you do not know how to use child-theme alb elements – tell me – or look to https://kriesi.at/documentation/enfold/intro-to-layout-builder/#customization )

    See: https://webers-testseite.de/button-class-to-anchor-tag/

    Thenn you can use as trigger (in this case) : a.conversion-button

    #1437674

    In reply to: Can not edit pages

    These are the sort of errors I am getting if I inspect the element in the backend.

    Failed to load resource: the server responded with a status of 403 ()
    wp-tinymce.js?ver=49110-20201110:11 Deprecated TinyMCE API call: <target>.onChange.add(..)
    avia-builder.js?ver=6.4.3-5.6.12:37 [AVIA-LOG] Switching to Classic Editor. Template Builder is in safe mode and will empty the textarea so user cant edit shortcode directly
    admin-ajax.php:1

    Failed to load resource: the server responded with a status of 403 ()

    #1437670

    Hi,

    Failed to load resource: the server responded with a status of 404 () post-206.css:1
    https://www.option-webdesign.nl/wp-content/uploads/dynamic_avia/avia_posts_css/post-206.css?ver=ver-1710774338

    If your server fails to generate the dynamic posts css file when the plugins are updated, try to disable the feature and allow the theme to instead add the custom styles inline. You can add this code in the functions.php file:

    /**
     * Filter to skip css file generation.
     * You can add logic to skip for certain pages/posts only.
     * 
     * @since 4.8.6.1
     * @param boolean $create
     * @return boolean					true | false or anything else to skip generation of css file
     */
    function custom_avf_post_css_create_file( $create )
    {
    	return false;
    }
    
    add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );

    Best regards,
    Ismael

    #1437370

    In reply to: Header

    Hi,
    Thank you for your patience as I understand what you would like to achieve, a full width changing image with a logo in the center at the top of every, post, page, & archive.
    I note a few limitations, first none of our sliders offer a random image on page load, so they would always start with the same image and rotate in order. Second you would like to add this to the top of every, post, page, & archive without editing each post & page, etc.
    So try this custom code to create this, if you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add this code and save:

    function random_image_slider_shortcode($atts) {
        // Define default attributes and override with user-defined attributes
        $attributes = shortcode_atts(
            array(
                'mobile_height' => '300px', // default mobile height
                'desktop_height' => '500px', // default desktop height
            ),
            $atts
        );
    
        // Define your image URLs here
         $images = array(
            'https://example.com/wp-content/uploads/image1.jpg',
            'https://example.com/wp-content/uploads/image2.jpg',
            'https://example.com/wp-content/uploads/image3.jpg',
            'https://example.com/wp-content/uploads/image4.jpg',
            'https://example.com/wp-content/uploads/image5.jpg',
        );
        // Start building the output
        $output = '<div id="random-image-slider" class="avia-section container_wrap fullsize" style="height: ' . $attributes['desktop_height'] . '; background-size: cover; position: relative;">';
    
        // Add logo overlay
        $output .= '<img src="https://example.com/wp-content/uploads/logo.png" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);" alt="Logo">';
    
        // Add script for changing the background image
       $output .= '<script>
            (function() {
                var images = ' . json_encode($images) . ';
                var currentIndex = Math.floor(Math.random() * images.length); // Start at a random index
                var container = document.getElementById("random-image-slider");
    
                function changeImage() {
                    container.style.backgroundImage = "url(" + images[currentIndex] + ")";
                    currentIndex = (currentIndex + 1) % images.length;
                }
    
                changeImage(); // Initial call to set the first image
    
                setInterval(changeImage, 3000); // Change image every 3 seconds
    
                // Responsive height adjustment
                function adjustHeight() {
                    var windowHeight = window.innerHeight;
                    var isMobile = window.matchMedia("(max-width: 768px)").matches;
                    container.style.height = isMobile ? "' . $attributes['mobile_height'] . '" : "' . $attributes['desktop_height'] . '";
                }
    
                window.addEventListener("resize", adjustHeight);
                adjustHeight(); // Initial call to set height
            })();
        </script>';
    
        $output .= '</div>';
    
        return $output;
    }
    
    add_shortcode('random_image_slider', 'random_image_slider_shortcode');
    

    In the code above change the 5 images to your image urls, and ensure to use full urls to the images, and also change the image url in the logo overlay.
    If you just wanted to use this script and add the element manually to your pages you could use this shortcode in a code block:

    [random_image_slider mobile_height="300px" desktop_height="500px"]

    Note that you can change the height of the element for mobile and desktop. Also note that if you use large square images the whole image will not show on every device, the image will be cropped to the height that you set, also this will not be full width when used in a code block element, this is an example of the results:
    Enfold_Support_5084.jpeg

    Now since you want this added automatically to the top of every, post, page, & archive create a second PHP snippet in the WP Code plugin and add this code:

    add_action('ava_after_main_title', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	if(is_single() || is_page() || is_archive() ) {
    		echo do_shortcode('[random_image_slider mobile_height="300px" desktop_height="500px"]');
    	}
    }

    You can change the heights to suit, since this is added to the pages while the page is being created the element will be full width:
    Enfold_Support_5086.jpeg
    Give this a try.

    Best regards,
    Mike

    #1437301

    As this does create a major inability to update page content, I would think this would be critical enough to pull 5.6.11 from Themeforest and replace it with a corrected zip file. Let me know if you’re going to do this => doing these file swaps is not good for customer service.
    =========
    I get the same. Does not appear on every page but does on most. Also, you cannot update a page without getting the error shown below. ( I removed the domain in the URL for privacy)

    Warning: Undefined variable $skipSecond in /home/customer/www/bottos.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/section/section.php on line 1517

    Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/xxxxxxxx.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/section/section.php:1517) in /home/customer/www/bottos.com/public_html/wp-admin/post.php on line 231

    I get the same. Does not appear on every page but does on most. Also, you cannot update a page without getting the error shown below. ( I removed the domain in the URL for privacy)

    Warning: Undefined variable $skipSecond in /home/customer/www/bottos.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/section/section.php on line 1517

    Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/xxxxxxxx.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/section/section.php:1517) in /home/customer/www/bottos.com/public_html/wp-admin/post.php on line 231

    #1437296
    tb23
    Participant

    After updating to the new version of Enfold, on the front page of my site, the following warning appears for everyone to see. How to correct it?
    Warning: Undefined variable $skipSecond in /home/httpd/vhosts/taniablanco.net/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/section/section.php on line 1517

    Please advise on how to correct it. Thank you!

    #1437235

    Hi
    I adjusted to this to account for the height of the header on desktop.

    function mobile_sub_menu_sticky() { ?>
    <script>
    window.addEventListener('DOMContentLoaded', function() {
      (function($){
      	var width = $(window).width();
        var $stickyTop = $('#sub_menu1');
        if (width <= 989) {
        $stickyTop.waypoint(function(direction) {
          if (direction === 'down') {
             $stickyTop.addClass('sticky-top');
          }
          if (direction === 'up') {
             $stickyTop.removeClass('sticky-top');
          }
        }, {
          offset: '0%'
        });
        }
    	else if (width >= 990) {
        $stickyTop.waypoint(function(direction) {
          if (direction === 'down') {
             $stickyTop.addClass('sticky-top');
          }
          if (direction === 'up') {
             $stickyTop.removeClass('sticky-top');
          }
        }, {
          offset: '187px'
        });
        }
      })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'mobile_sub_menu_sticky');

    and the css:

    @media only screen and (max-width: 989px) { 
    .responsive #top #sub_menu1.av-switch-768.av-submenu-container.sticky-top {
    	position:fixed!important;
    	top:0!important;
    	z-index:600!important;
    }
    }
    @media only screen and (min-width: 990px) { 
    .responsive #top #sub_menu1.av-submenu-container.sticky-top {
    	position:fixed!important;
    	top:172px!important;
    	z-index:600!important;
    }
    }

    Best regards,
    Mike

    thinkjarvis
    Participant

    Hi I have a large enfold site where I get a memory exausted error when trying to edit an ALB image element.

    This only occurs on the image element.

    I ahve tried with REDIS enabled and REDIS disabled. I’ve also disabled caching to see if that is the issue.

    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 14680120 bytes)

    The weirdest part is the allowed memory limit is set to 8gb. So I dont understand why the memory limit is set at 536mb as above.

    Any chance you could take a look at this? Happy to provide access to the site so you can see the problem

    #1437174

    Hey jaimemerz,
    Thank you for the link to your site I added this snippet to your WP Code plugin and ensured that in the top right corner it was a code type: PHP snippet
    Enfold_Support_2680.jpeg
    then I added this code and saved.

    function mobile_sub_menu_sticky() { ?>
    <script>
    window.addEventListener('DOMContentLoaded', function() {
      (function($){
      	var width = $(window).width();
        var $stickyTop = $('#sub_menu1');
        if (width <= 767) {
        $stickyTop.waypoint(function(direction) {
          if (direction === 'down') {
             $stickyTop.addClass('sticky-top');
          }
          if (direction === 'up') {
             $stickyTop.removeClass('sticky-top');
          }
        }, {
          offset: '0%'
        });
        }
      })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'mobile_sub_menu_sticky');

    I then added a second snippet with this css:

    .responsive #top #sub_menu1.av-switch-768.av-submenu-container.sticky-top {
    	position:fixed!important;
    	top:0!important;
    	z-index:600!important;
    }

    and now on your page the fullwidth submenu is sticky when it reachs the top, and un-sticks with you scroll back to the top:
    Enfold_Support_5060.jpeg
    Please clear your browser cache and check.
    Best regards,
    Mike

    #1437173

    In reply to: Text Box

    This reply has been marked as private.
    #1437121
    El
    Participant

    Hey there,

    we geht an error that is triggered by the Enfold minify script process:

    AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0 in /var/www/vhosts/aerobis.com/httpdocs/wp-content/themes/enfold/framework/php/function-set-avia-backend.php:1146\nStack trace:\n#0 /var/www/vhosts/aerobis.com/httpdocs/wp-content/themes/enfold/framework/php/function-set-avia-backend.php(1146): fread()\n#1 /var/www/vhosts/aerobis.com/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-asset-manager.php(810): avia_backend_create_file()\n#2 /var/www/vhosts/aerobis.com/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-asset-manager.php(358): aviaAssetManager->generate_file()\n#3 /var/www/vhosts/aerobis.com/httpdocs/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-asset-manager.php(243): aviaAssetManager->merge()\n#4 /var/www/vhosts/aerobis.com/httpdocs/wp-includes/class-wp-hook.php(324): aviaAssetManager->try_minifying_scripts()\n#5 /var/www/vhosts/aerobis…’

    This happens (or at least affects us) since the provider updated to the latest recommended Woocommerce / WordPress versions of MySQL and PHP.

    Best,
    El

    Tim
    Participant

    Sorry that there are now two more questions… Um, I just can’t get the shadow of the box to match the first box everywhere. What do I need to change 😬?
    First box:
    Screenshot-2024-03-12-205837.png
    Next boxes:
    Screenshot-2024-03-12-205857.png

    And I would also like to change this article (https://umwelt-magazin.eu/wp-admin/post.php?post=36168&action=edit) from the layout architect to a plain post. Is there a more effective way of doing this than setting everything again in the plain post for almost every image? Is there any way to export articles from the Avia Layout Architect to a plain post?
    Best regards Tim

    #1437021

    Hello Rikard,

    Yes, I allow you to deactivate plugins.

    Also, you should know that I’ve tested with PHP versions 7.4, 8.0, 8.1 and 8.2 but nothing changes.
    I’ve also tested with another template and the result is OK. I really think the problem is with the enfold template.

    I look forward to hearing from you.

    #1436894

    In reply to: Count up function

    Hey calebcuster,
    Unfortunately the Animated Countdown element datepicker will not allow you to choose a past date so this will not work, the post that you linked to was from 2015.
    Instead try this shortcode count up clone, add this code to the end of your child theme functions.php file in Appearance ▸ Editor or if you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add this code and save.

    function wp_custom_countup_shortcode($atts) {
        // Extract shortcode attributes
        $a = shortcode_atts(array(
            'date' => '2020-01-01', // Default date
            'color' => 'black', // Default font color
            'background' => 'white', // Default background color
            'offset' => '0', // Default timezone offset in hours
        ), $atts);
    
        $uid = uniqid('countup_');
    
        // Enqueue jQuery if it's not already included
        wp_enqueue_script('jquery');
    
        // Output HTML
        $html = "<div id='{$uid}'  class='av-countdown-timer-inner'>
                    <span class='av-countdown-cell av-align-center'><span class='av-countdown-cell-inner' style='color: {$a['color']}; background-color: {$a['background']};'><span class='av-countdown-time weeks'></span><span class='av-countdown-time-label'>Weeks</span></span></span>
    <span class='av-countdown-cell av-align-center'><span class='av-countdown-cell-inner' style='color: {$a['color']}; background-color: {$a['background']};'><span class='av-countdown-time days'></span><span class='av-countdown-time-label'>Days</span></span></span>
    <span class='av-countdown-cell av-align-center'><span class='av-countdown-cell-inner' style='color: {$a['color']}; background-color: {$a['background']};'><span class='av-countdown-time hours'></span><span class='av-countdown-time-label'>Hours</span></span></span>
    <span class='av-countdown-cell av-align-center'><span class='av-countdown-cell-inner' style='color: {$a['color']}; background-color: {$a['background']};'><span class='av-countdown-time minutes'></span><span class='av-countdown-time-label'>Minutes</span></span></span>
    <span class='av-countdown-cell av-align-center'><span class='av-countdown-cell-inner' style='color: {$a['color']}; background-color: {$a['background']};'><span class='av-countdown-time seconds'></span><span class='av-countdown-time-label'>Seconds</span></span></span>
                 </div>";
    
        // Adjust the current time for the timezone offset
        $offsetMilliseconds = $a['offset'] * 3600 * 1000; // Convert hours to milliseconds
    
        // JavaScript to update the countdown
        $html .= "<script>
                    jQuery(function($) {
                        var countUpDate = new Date('{$a['date']}').getTime();
                        var x = setInterval(function() {
                            var now = new Date().getTime() + {$offsetMilliseconds}; // Adjust for timezone offset
                            var distance = now - countUpDate;
                            var weeks = Math.floor(distance / (1000 * 60 * 60 * 24 * 7));
                            var days = Math.floor((distance % (1000 * 60 * 60 * 24 * 7)) / (1000 * 60 * 60 * 24));
                            var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
                            var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
                            var seconds = Math.floor((distance % (1000 * 60)) / 1000);
                            
                            $('#{$uid} .weeks').text(weeks);
                            $('#{$uid} .days').text(days);
                            $('#{$uid} .hours').text(hours);
                            $('#{$uid} .minutes').text(minutes);
                            $('#{$uid} .seconds').text(seconds);
                        }, 1000);
                    });
                  </script>";
    
        return $html;
    }
    add_shortcode('custom_countup', 'wp_custom_countup_shortcode');
    

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    Then use this shortcode on the page to display:
    [custom_countup date="2024-03-10" color="#fff" background="#000" offset="-4"]
    the first attribute is the date in the past, then the font color, then the cell background color, and then the time offset, this is the difference between your server time and the time you want to use, since our servers are not always in the same timezones as we are. The default is zero if you don’t add this attribute.
    This is the result:
    Enfold_Support_5011.jpeg
    This uses the same classes as the countdown element so the style is pretty close, here is what the two together look like:
    Enfold_Support_5013.jpeg

    Best regards,
    Mike

    #1436836

    Hey micheladalcastagne,
    Thanks for your patience and the link to your site, I don’t have a lot experience with the polylang plugin, first I noted that your homepage in both languages are named the same so I added the language code to them to sort them out in the theme options because your site domain is showing as a EN language and thus your menu is EN when you want it to be IT:
    Enfold_Support_4989.jpeg
    so now we can sort it out a little better:
    Enfold_Support_4991.jpeg
    Then going to the Languages ▸ Settings I found that you seem to need to choose the language from above before setting the options:
    Enfold_Support_4993.jpeg
    So now I have the menu language to match the page language along with the correct flag.

    Now for your second issue where when you are on the /privacy-policy/ page you can use the menu items to get back to your homepage because all of your menu items are only hash links.
    Since you are not using a child theme I installed the WP Code plugin then added a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then added this code, I also created two new menus for you, one for each /privacy-policy/ page with the full urls to the homepage.

    add_filter( 'wp_nav_menu_args', 'ppen_nav_menu_args' );
    function ppen_nav_menu_args( $args = '' ) {
    if($args['theme_location'] === 'avia') {
    if( is_page( 627 ) ) {
    $args['menu'] = '25';
    }
    return $args;
    }
    }
    
    add_filter( 'wp_nav_menu_args', 'ppit_nav_menu_args' );
    function ppit_nav_menu_args( $args = '' ) {
    if($args['theme_location'] === 'avia') {
    if( is_page( 3 ) ) {
    $args['menu'] = '24';
    }
    return $args;
    }
    }

    Now each /privacy-policy/ page has a working menu to the correct homepage.
    Best regards,
    Mike

    #1436815

    Hey Volgspot,
    Thanks for your patience, are you using a Mailchimp form in your sidebar, or were you using a third party Mailchimp form plugin before this occured?
    Have you recently updated your PHP from v7.4 to v8?
    If so try comparing your webhost PHP extensions for PHP 7.4 & 8.0 that same extension may not be enabled by default for your new PHP version causing the error, here is an example of the enabled extensions for PHP v8 on my site:
    php_v8.jpeg
    If you can’t find a difference try rolling back to v7.4 to rule out this as a cause.
    If this doesn’t help and you have tried also disabling all of your plugins, please include an admin login in the Private Content area so we can examine.

    Best regards,
    Mike

    #1436813
    This reply has been marked as private.
    #1436812

    In reply to: Beiträge

    Hi,
    To change the number of grid columns on a archive page, such as categories, edit your \wp-content\themes\enfold\archive.php on line 69 look for ‘columns’ => 3; and change to the number you wish:
    Enfold_Support_4967.jpeg
    You can copy the modified file to your child theme if you wish.

    Best regards,
    Mike

    #1436786

    In reply to: Layout Architect

    Screenshot-2024-03-09-091812.png
    Screenshot-2024-03-09-091745.png
    Screenshot-2024-03-09-091714.png

    Hello!
    I’m trying the child theme now. Can you maybe send me the different codes I need to add to functions.php and the ones I need to add to the post?
    The category, post image (format) and heading (size) should be as in the first image. Author, date, number of comments should be as in the second image. “Beitrag teilen” should be also possible.
    I hope it is also possible that the comment sector of wpDiscuz 7 can also look like in picture 3.
    Best regards Tim

    • This reply was modified 2 years, 1 month ago by Tim.
    #1436727

    Hey Jan,

    I tried to add a solution with WP filter – that would be a solution to maintain code in one place and also for other plugins to hook.

    If you could please test it before we add it to final core.

    1.) replace enfold\js\avia-js.js with

    https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_5_6_10/js/avia.js

    https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_5_6_10/js/avia-js.js

    Check class aviaJSHelpers in this file.

    2.) in the files you mentioned instead of your code add:

    
    		//	allow 3-rd party plugins to hook (see enfold\js\avia-js.js aviaJS.aviaJSHelpers)
    		if( window['wp'] && wp.hooks )
    		{
    			allow_continue = wp.hooks.applyFilters( 'aviaCookieConsent_allow_continue', allow_continue );
    		}
    

    3) To load WP hook js in enfold\functions.php around line 574:

    
    		wp_enqueue_script( 'avia-js', "{$template_url}/js/avia-js{$min_js}.js", array(), $vn, false );
    

    replace with:

    
    		wp_enqueue_script( 'avia-js', "{$template_url}/js/avia-js{$min_js}.js", array( 'wp-hooks' ), $vn, false );
    

    Thank you for checking in advance and your help.

    Regards,
    Günter

Viewing 30 results - 811 through 840 (of 16,890 total)