Forum Replies Created

Viewing 30 posts - 1 through 30 (of 174 total)
  • Author
    Posts
  • in reply to: Fixed frame with 1px border #1473760

    Thanks all and the solution above works perfectly. Thank you Guenni007

    in reply to: Fixed frame with 1px border #1473747

    Hey Mike, yes please and I’ve not tested the other suggestions yet. If the over extension of the border can be fixed with CSS then that solves the issue. Any ideas very much appreciated.

    in reply to: Secure Custom Field after excerpt [additional] #1473746

    Hey Ismael

    Excellent thanks and I’ve combined the two functions for simplicity and posting here if anyone else wants a function that adds custom fields to grid posts (ALB) and single posts (Non-ALB).

    // Helper function to generate the custom event details HTML
    function generate_custom_event_details($post_id) {
        $event_date = get_post_meta($post_id, 'event_date', true);
        $event_time = get_post_meta($post_id, 'event_time', true);
        $event_location = get_post_meta($post_id, 'event_location', true);
    
        $custom_output = '<div class="custom-event-details">';
        if ($event_date) {
            $custom_output .= '<p class="event-date"><strong>Event Date:</strong> ' . esc_html($event_date) . '</p>';
        }
        if ($event_time) {
            $custom_output .= '<p class="event-time"><strong>Event Time:</strong> ' . esc_html($event_time) . '</p>';
        }
        if ($event_location) {
            $custom_output .= '<p class="event-location"><strong>Event Location:</strong> ' . esc_html($event_location) . '</p>';
        }
        $custom_output .= '</div>';
    
        return $custom_output;
    }
    
    // Filter for avf_post_slider_entry_excerpt
    add_filter('avf_post_slider_entry_excerpt', function ($excerpt, $prepare_excerpt, $permalink, $entry, $context) {
        $custom_output = generate_custom_event_details($entry->ID);
    
        // Check if the "Read More" link exists in the excerpt
        $read_more_position = strpos($excerpt, '<a');
        if ($read_more_position !== false) {
            // Insert the custom output before the "Read More" link
            $before_read_more = substr($excerpt, 0, $read_more_position);
            $read_more_and_after = substr($excerpt, $read_more_position);
            return $before_read_more . $custom_output . $read_more_and_after;
        }
    
        // Append custom output if no "Read More" link is found
        return $excerpt . $custom_output;
    }, 10, 5);
    
    // Filter for the_content
    add_filter('the_content', function ($content) {
        if (is_singular('post')) {
            $custom_output = generate_custom_event_details(get_the_ID());
            $content .= $custom_output;
        }
    
        return $content;
    }, 10);
    in reply to: Fixed frame with 1px border #1473561

    Hi Ismael, thanks for the possible solution and I have tried the following but with limited results the border extends to far.

    The dev site is below, thanks.

    .av-frame.av-frame-top.av-frame-vert {
          box-shadow: 0 -29px 0px 30px black;
    }
    .av-frame.av-frame-bottom.av-frame-vert {
        box-shadow: 0 8px 0px 9px black;
    }
    .av-frame.av-frame-left.av-frame-hor {
        box-shadow: 0 0px 0px 1px black;
    }
    .av-frame.av-frame-right.av-frame-hor {
        box-shadow: 0px 0px 0px 1px black;
    }
    in reply to: Secure Custom Field after excerpt #1473479

    Hey Ismael, that’s great thanks it worked. Although the fields appeared after the Read More button so I have adjusted the code. Not sure if it’s the most tidy way of doing it though.

    add_filter('avf_post_slider_entry_excerpt', function ($excerpt, $prepare_excerpt, $permalink, $entry, $context) {
        $event_date = get_post_meta($entry->ID, 'event_date', true);
        $event_time = get_post_meta($entry->ID, 'event_time', true);
        $event_location = get_post_meta($entry->ID, 'event_location', true);
    
        // Prepare custom output
        $custom_output = '<div class="custom-event-details">';
        if ($event_date) {
            $custom_output .= '<p class="event-date"><strong>Event Date:</strong> ' . esc_html($event_date) . '</p>';
        }
        if ($event_time) {
            $custom_output .= '<p class="event-time"><strong>Event Time:</strong> ' . esc_html($event_time) . '</p>';
        }
        if ($event_location) {
            $custom_output .= '<p class="event-location"><strong>Event Location:</strong> ' . esc_html($event_location) . '</p>';
        }
        $custom_output .= '</div>';
    
        // Check if the "Read More" link exists in the excerpt
        $read_more_position = strpos($excerpt, '<a');
        if ($read_more_position !== false) {
            // Insert the custom output before the "Read More" link
            $before_read_more = substr($excerpt, 0, $read_more_position);
            $read_more_and_after = substr($excerpt, $read_more_position);
            return $before_read_more . $custom_output . $read_more_and_after;
        }
    
        // Append custom output if no "Read More" link is found
        return $excerpt . $custom_output;
    }, 10, 5);
    in reply to: Secure Custom Field after excerpt #1473417

    Hi Ismael

    Thanks for the reply and I’m using the builder. Here’s the URL and it’s the three column grid posts sections.

    Richard

    in reply to: Different logo on pages and posts (transparent header) #1464993

    Excellent and a super easy fix — doh, why didn’t I think of that.

    Super
    Thanks
    Richard

    in reply to: Different logo on pages and posts (transparent header) #1464961

    Hi Mike

    Sorry for the delay in replying and I managed to get that working from the thread. The only bit I need to fix now is for the page to use the same logo on the mobile view. See URL (switch between desktop and mobile)

    Thanks
    Richard

    in reply to: Contact form button custom styling #1447193

    Hey there, this is very useful and I’ll test on one of my other Enfold sites.

    Thanks
    Richard

    in reply to: Contact form button custom styling #1447173

    Hey Ismael

    This is fantastic thank you. Been trying to find a fix for years for the submit button styling.

    Richard

    • This reply was modified 6 months, 3 weeks ago by raslade.
    in reply to: Parallax rules and position #1413469

    Hey Mike, no problem and that’s perfect — exactly what I needed and will have a go at implementing.

    Richard

    in reply to: Blog grid icon overlay missing on mobile #1375499

    Hey Nikko

    Perfect thank you and all fixed. Yes, another reason why Enfold is so awesome — the support always delivers :-)

    Richard

    in reply to: Blog grid icon overlay missing on mobile #1375091

    Hey Nikko

    Thanks for the solution although I couldn’t find that code on line 658. I did find

        	if($.avia_utilities.isMobile) return;
    
    		if( $('body').hasClass( 'av-disable-avia-hover-effect' ) )
    		{
    			return;
    		}

    On line 601 but removed, cleared but no luck.

    Thanks
    Richard

    in reply to: Blog grid icon overlay on permanently #1373477

    Well that was too simple. I feel a little foolish but it’s very much appreciated, thank you.

    Richard

    in reply to: Inline search menu bug on Windows only #1367068

    Hey Mike, OK i’ll give that a go and test on another machine that has earlier versions.

    Richard

    in reply to: Inline search menu bug on Windows only #1366866

    Hey Mike

    Agreed and you say fixed. I may have to look at altering the search field as I can’t guarantee that all visitors will have the lastest version. Do you know and CSS that might lock it in place?

    Thanks
    Richard

    in reply to: Inline search menu bug on Windows only #1366746

    Hey Mike, thanks for checking. They were using v105 then once updated it was OK. Not sure that helps though as ideally like the menu to be backward compatible.

    Richard

    in reply to: Inline search menu bug on Windows only #1366691

    Hi there, thanks for checking. One of my colleagues on a PC using Chrome has managed to replicate the issue https://share.vidyard.com/watch/XtsKMhDs4DSBAae9oz3JUa?autoplay=1&vyetoken=5548d107-6394-4cde-ae02-3f5f6203d36f

    Thanks
    Richard

    in reply to: Inline search menu bug on Windows only #1366378

    Sorry yes, that would be useful. No screenshot is needed. Basically, the search field disappears once activated or hovered over.

    Richard

    Thank you and yes please you can close the ticket.

    Richard

    Hey Ismael

    Rookie mistake — forgot to check that js merge was disabled. Sorted and thanks for your help once again.

    Richard

    in reply to: Search in secondary menu glitch #1331988

    Yes thank you the topic can be closed now.

    in reply to: Search in secondary menu glitch #1331946

    Hey Ismael

    Of course, simple and elegant:

    #avia-menu #menu-item-search {
        opacity: 0;
    }
    #avia2-menu #menu-item-search {
        opacity: 1;
    }

    Excellent support as always, thank you.

    Richard

    in reply to: Randomise posts in category page #1331339

    Hey Ismael, thanks for getting back to me and I’ve got it working now with this adjustment. The session has to be unique so I tested using new private browser windows each time. This replicates what new visitors would see.

    Thanks
    Richard

    in reply to: Image with hotpots links #1308947

    Ignore my question I’ve just spotted that this function has been integrated with the latest version of Enfold.

    Thanks Ismael. With a slight tweak it works perfectly, thank you.

    Final code (that works for blog grid) if anyone else needs it:

    // a custom script
    // use external link
    function ava_custom_script_mod() {
        if ( wp_script_is( 'avia-default', 'registered' ) ) {
            wp_add_inline_script( 'avia-default', '
    		(function($) {
    			$(document).ready(function() {
    				$(".post-format-link .more-link").on("click", function(e) {
    					if(e.preventDefault) e.preventDefault();
    					var content = $(this).parents(".slide-content");
    					var header = content.find(".entry-content-header");
    					var external_link = header.find("a").attr("href");
    
    					window.open(external_link, "_blank" );
    				})
    			});
    		})(jQuery);
    	');
        }
     }
     add_action( 'wp_enqueue_scripts', 'ava_custom_script_mod', 9999);

    Hey Mike, not a problem, we all need a weekend ;-)

    I’ve adjusted the code but then the site wouldn’t load. I tried changing the PHP version but no luck. I’m running 4.8.1 with PHP 7.4.16

    Thanks
    Richard

    Hey Ismael, there are many reasons why I love Enfold — an amazing support forum is definitely one of them and this works perfectly, thank you. One final question related to the link. I’ve added the following to the functions file to force links to open a new page:

    add_filter('wp_footer', 'avf_add_target_blank', 10);
    function avf_add_target_blank() { ?>
    <script>
    (function($){
        $(window).load(function() {
        	$( ".avia-content-slider .slide-entry-title a, .more-link" ).each(function() {
    			$(this).attr('target','_blank');  
    		});
        });
    	
    })(jQuery);
    </script>
    <?php
    }

    It correctly adds target=”_blank” to the code but for some reason doesn’t open a blank page.

    I’ve tried a.more-link, .more-link a, .read-more-link .more-link a, but still no luck. Am I missing something?

    Thanks
    Richard

    in reply to: Enfold 4.5.5 download #1248214

    All good thanks, please close the thread.

    in reply to: Enfold 4.5.5 download #1248185

    Great thank you.

    Richard

Viewing 30 posts - 1 through 30 (of 174 total)