Forum Replies Created

Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • Hi Rikard,

    Thank you for getting back to me. Unfortunately I can’t share log in details for this site, as I’ve signed an NDA for patient confidentiality etc. But I am comfortable with code if you want me to implement any code updates or take more screenshots for you etc. I hope we can figure out a solution this way, but please let me know how I can best help with this.

    Thank you.

    Brendon

    Hi Mike, thank you for getting back to me and for your CSS suggestion. I’ve implemented it now to take care of the issue, although it did create a few issue in areas where I’d actually used line breaks as part of my formatting, but I managed to write exclusions for all those instances.

    It still boggles my mind as to why these line breaks are being added in our custom templates. If you or anyone else thinks of a reason this could be happening, please do let me know, as it would be better to still have unrestricted use of the line break tag.

    And no, i’m definitely not using the default editor or the shortcode wand… I’m fully in the Advanced Layout Builder mode always. Unless Enfold’s template structure is reading it as such when we duplicate the template-builder template for some reason. But I’m definitely working in template builder mode directly.

    For those interested, here is my CSS code that includes the various exclusions I needed for certain elements:

    /* French Website - Remove Line Breaks */
    
    #top.page-template-template-french .entry-content-wrapper br {
    	display: none !important;
    }
    /* Override line-break removal for certain elements */
    #top.page-template-template-french .av-image-caption-overlay br, #top.page-template-template-french .av-tab-section-tab-title-container br, #top.page-template-template-french .avia_textblock br {
    	display: inline-block !important;
    }

    Thank you again for all your assistance with this, and if you do think of anything else I could try, Please do let me know.

    Thank you.

    Brendon

    Hi Mike, thank you very much for taking the time to go through my tutorial and build all this to help me troubleshoot this issue. You have no idea how much I appreciate it, as I’ve tried everything I can think of to fix this without any luck.

    The issue appears throughout the length of all my French pages after certain elements like between heading elements and text boxes and text boxes and buttons. It also appears between images and text boxes, but I couldn’t verify if it was happening in your test page, as I don’t have the image.

    All my pages are very long and complicated and probably won’t make much sense to you since all the images will be missing etc. So to try and simplify things, I’ve added a few elements to your test shortcode where I can see the additional line break being added to the HTML source code.

    I’ve attached a text file with the modified shortcode in it in the private content area. You should now see 3 columns with an h2 heading element, text box and button… if you look at the output HTML source code, you should see a <b> tag below the heading and before the text block code, and then again after the text block and before the buttons.

    I’ve also verified that if I switch the page back to the default template, the line breaks are removed, and they’re added back again when I switch back to the French template. Please try this on your side to see if you can see the difference as well.

    If you still need me to send you my original shortcode, I can do this as well.

    Once again, thank you for your time and effort helping me with this… I look forward to hearing back from you.

    Brendon

    Hi guys, I’ve run into a small, but frustrating issue with my above outlined solution, in that on the pages that use my French Template (see above for how I created it), some of the Avia Layout Builder elements are adding an additional line break below them in the output HTML source code, which is of course causing my page layout to be incorrect and different from my English site. In the screenshot below you can see the first column is the way it should be, and the second column is what it looks like with the added line break:

    Screenshot showing added line break...

    Here is how the output source code differs between the two columns in the screenshot above:

    Left Column:

    <span class='hr-inner-style'></span></span></div><section class="av_textblock_section " itemscope="itemscope" itemtype="https://schema.org/CreativeWork" ><div class='avia_textblock text-justify ' itemprop="text" ><p>Ces deux îles sont étonnamment...

    Right Column (note the line break tag before the section tag):

    <span class='hr-inner-style'></span></span></div><br />
    <section class="av_textblock_section "  itemscope="itemscope" itemtype="https://schema.org/CreativeWork" ><div class='avia_textblock text-justify '   itemprop="text" ><p>Les îles vierges...

    I’ve manged to narrow down the issue to the line spaces in the Layout Builder’s short code editor field. If I remove all the line breaks between the line space shortcode and the preceding image shortcode, and do the same for the text box shortcode that follows, then the additional line break is not added to the frontend page.

    So this:

    ...Antigua & Barbuda</a>
    [/av_image]
    
    [av_hr class='invisible' height='5' shadow='no-shadow' position='center' custom_border='av-border-thin' custom_width='50px' custom_border_color='' custom_margin_top='30px' custom_margin_bottom='30px' icon_select='yes' custom_icon_color='' icon='ue808' font='entypo-fontello' av_uid='av-jl0ywt24' custom_class='' admin_preview_bg='']
    
    [av_textblock size='' font_color='' color='' id='' custom_class='text-justify' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' av_uid='av-vd96' admin_preview_bg='']
    These 2 islands offer an amazing contrast despite being a short sail apart. Antigua boasts rich history and culture whilst Barbuda is the picture perfect desert island. This trip covers 5 outstanding kite spots on both islands and offers outstanding flat water conditions. <a href="https://caribbeankitecruise.com/antigua-barbuda/">Explore Antigua & Barbuda</a>.
    [/av_textblock]

    Becomes this:

    Antigua & Barbuda</a>
    [/av_image][av_hr class='invisible' height='5' shadow='no-shadow' position='center' custom_border='av-border-thin' custom_width='50px' custom_border_color='' custom_margin_top='30px' custom_margin_bottom='30px' icon_select='yes' custom_icon_color='' icon='ue808' font='entypo-fontello' av_uid='av-jl0ywt24' custom_class='' admin_preview_bg=''][av_textblock size='' font_color='' color='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' av_uid='av-vd96' custom_class='text-justify' admin_preview_bg='']
    Ces deux îles sont étonnamment différentes bien que très proches l'une de l'autre. Antigua arbore une histoire et une culture très riche, tandis que Barbuda est à l'image de la parfaite île déserte. Au cours de cette croisière vous aurez l'opportunité de découvrir cinq superbes spots de kitesurf et de naviguer sur un plan d’eau plat translucide. Découvrez Antigua & Barbuda.
    [/av_textblock]

    However the normal default template doesn’t parse line breaks in the shortcode as line breaks in the output HTML, so why is my French template doing this, do you think? Have I used the wrong enfold template to base my French template on? I used template-builder.php and made no other changes other than calling a different header and footer file. And I’ve tested removing those modified calls (so an identical copy of template-builder.php), and it doesn’t fix this issue.

    Or is there something else that could be causing this issue that I am missing?

    Any help with this would be greatly appreciated, because if I can’t solve this issue, I would have to go back and edit 40 French pages to remove the line breaks from the shortcode editor – and not all template builder elements are affected like this, so I’d first have keep figuring out which line breaks to remove.

    Thank you.

    Brendon

    Hi Peter,

    I’m glad to hear you found my solution helpful.

    To answer your question, you can expand this solution to accommodate as many languages or alternative menus as you like by replicating steps 1 – 3, and in step 4 expand the code in your functions.php like this:

    /*
    Display multiple alternative menus
    */
    
    add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
    
    function my_wp_nav_menu_args( $args = '' ) {
    
    if($args['theme_location'] === 'avia') 
         if( basename( get_page_template() ) == 'template-french.php') { 
              $args['menu'] = 'French Main Menu'; 
         } elseif( basename( get_page_template() ) == 'template-german.php') { 
              $args['menu'] = 'German Main Menu'; 
         }  elseif( basename( get_page_template() ) == 'template-italian.php') { 
              $args['menu'] = 'Italian Main Menu'; 
         } else { 
              $args['menu'] = 'Main Menu';
         } 
    return $args;
    }
    

    I haven’t tested the above code, but it should work. If you have any problems getting it to work, let me know.

    Note to Moderators: You can leave this thread open in case others have questions. I’m happy to assist with implementation where I can…

    in reply to: My Forum Post #1128443

    PS: You can delete this thread as it doesn’t serve anyone…

    in reply to: My Forum Post #1128442

    Awesome, thanks Rikard.

    My pleasure Rikard. And yes, I hope this can save someone a lot of time and effort looking for a menu replacement solution, or having to resort to a heavy Multi-lingual plugin that may contain lots of features that they don’t actually need.

    Hi Rikard,

    Thank you for getting back to me. It appears that the new 4.5.5 version is working with custom post types now.

    Thank you.

    Brendon

    Hi Pixelbits,

    Just to add to what Basilis said above, I wanted to point out that there is nothing wrong with the theme, and the way the theme currently works is the right way and doesn’t need fixing so to speak. There’s nothing broken there. The reason for this is because PHP and WordPress can’t query the fragment or anchor (# part of the URL) because the anchor is changed on the client side, not the server side. So you’ll need some fancy Javascript trickery to query the # part of the URL, or you need to find another way to predict what the anchor will be on the server side, which is the method I am interested in exploring. In particular, I want to use the title or slug of my tabs (because I know what these are, and should be able to query them with a custom function) to modify the share URL via the social share filter.

    However I haven’t had a chance to work on this yet, but if I do develop a solution, I will definitely post how I did it here.

    Also keep in mind that under normal circumstances, you actually wouldn’t want the theme’s social media sharing feature to include the anchor of a URL, as you’d prefer the clean page URL to be shared and promoted. So this is a very specific use case that we’re looking at adding.

    Brendon

    Thanks for getting back to me on this Ismael.

    So is there no way to query the slug of the tab directly via a function added to functions.php? That’s not a bad suggestion to use the tab section title to determine the slug with a bit of manipulation, but would be easier to just query the slug directly if there were such a function. Of course even if I use the title of the tab, how would I query the title of each tab? Do you guys have a function for this that I can use?

    A custom script would definitely be doable, but I was hoping to avoid that, as I imagine a query in my functions.php file would be easier to maintain.

    Thanks.

    Brendon

    Hi Stadsherberg,

    Not sure if you managed to solve this problem, but I had the same issue and found a quick and easy way to solve it.

    Just comment out the following line of code in /js/shortcodes.js on line 2607

    //single_tabs = container.find('.av-animation-delay-container'), //for elements inside the tab that receive waypoint animation

    Now the thumbnails in the hidden tabs should be loaded and fully visible when you switch tabs.

    I see there is a way to override /js/shortcodes.js by adding it to your child theme folder, but I wouldn’t bother, as you need the full code from this file in your child theme for it to work, so you’re going to have to replace it after a major update anyway. Just remember to go back and comment out this line after each theme update.

    I hope this helps.

    Brendon

    in reply to: Hide Gallery Captions on Mobile devices #610480

    Thanks for your reply Ismael, and sorry for my delayed response.

    I just wanted to let you know (and anyone else reading this) that I found my mistake. I had one of the curly brackets the wrong way round, so it caused my code to stop processing at that point. This is the reason why nothing I tried worked. So all of the above solutions would have worked, but couldn’t due to my typo.

    I appreciate your help though.

    Thank you.

    in reply to: Hide Gallery Captions on Mobile devices #597319

    Hi Jordan,

    Thanks for getting back to me.

    I don’t understand though how the captions aren’t visible on your end. The screenshot I took above was taken just before I posted my question above, and I haven’t made any changes since. I still see the captions on both mobile and desktop, and I’ve had other people test the site as well, and they also see the captions.

    Just so we’re on the same page here, the captions I’m referring to are the black caption bubbles that pop up above the thumbnails when you hover your mouse over a thumbnail on a desktop or laptop, or when you click on a thumbnail on a mobile phone (see screenshot).

    Also, I know how to hide them on mobile only using media queries, but for now I want to see it working successfully across all devices before I move the code to the appropriate media queries only.

    So the big question is, why can’t you see the captions on your end, when I still see them on my end? I’ve disabled the cache plugin, checked that my browser is pulling the updated style sheet, tested it in Chrome, Opera and on my Android phone, and clicked CTRL F5 for good measure.

    Here’s what I see on my desktop screen when I hover over the thumbnails. The black caption box should not be showing….

    Captons Screenshot

    Thank you.

    in reply to: Add Login / Log out links to top menu #533492

    Hi Elliott,

    Thanks for getting back to me. This is exactly what I was missing! Works perfectly now. Thank you.

    In case anyone else is trying to add sign in/sign out logic to their header that uses non WP default pages (like with a WooCommerce store) via the functions.php file, here’s the code:

    // Add Log in / log out links to top menu
    
    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
        if (is_user_logged_in() && $args->theme_location == 'avia2') {
            $items .= '<li><a href="your-domain/account/customer-logout/">Log Out</a></li>';
        }
        elseif (!is_user_logged_in() && $args->theme_location == 'avia2') {
            $items .= '<li><a href="your-domain/account/">Log In</a></li>';
        }
        return $items;
    }

    This will add the links to the top menu in your theme. Just replace the URL’s with your own URL’s to your log in and log out pages.

    in reply to: Add Login / Log out links to top menu #532637

    Hi there, can anyone help me with this? I see all posts before and after mine have been answered except mine.

    Thank you.

    Hi guys,

    I just wanted to let you know that I managed to resolve the above layout issue. As it turns out, it looks like the layout issues were being caused by malicious code. While I can’t be sure that’s the case, once I discovered and removed the malicious code, my site layout was back to normal.

    So if anyone else is experiencing similar issues that you can’t explain, look for this file: .backup_time on your server root. If you find it, your site has been hacked, and contains very pesky malicious code that keeps reproducing itself even if you delete the above mentioned file.

    More about this hack here: http://stackoverflow.com/questions/22647441/what-does-this-malicious-php-code-found-in-a-wordpress-install-do

    Also, do a search on Google and you’ll find plenty more info about this hack.

    Thank you Ismael for your assistance, and sorry for wasting your time.

    Brendon

    Hi Ishmael,

    If you are referring to me, my hosting guys reverted my site back to an older version shortly after I submitted my post, to see if that would fix the problem. Unfortunately it didn’t. I can assure you though, at the time I wrote the above post, my site was running the latest version of WP, the latest version of the Theme and all my plugins were up to date. Still the problem persisted, so it isn’t a version issue.

    Thanks.

    Brendon

    Hi Josue,

    This worked out perfectly! Thank you very much for the tip.

    Brendon

    Hi Ismael,

    Thank you for your reply.

    Unfortunately this is still the exact same solution as Andy’s. Hiding the elements via CSS doesn’t address the issue we are having. The entire course system (custom posts) is still being treated like part of the blog, which is not correct. Another issue I didn’t mention is that throughout our courses system, the heading sections has the name of our blog in it: “The Real Estate Agent Blog”. This makes no sense and should rather say something like the title of our courses page or contain the current page title.

    I don’t want to just hide these elements via CSS, because it means they still have to be loaded, which adds unnecessary overhead to our entire courses platform. The shouldn’t be there at all if you know what I mean. As per my original question, how do I stop these custom post types from being treated like blog posts? Or how do I edit the custom posts template to not include all these elements we don’t need?

    I hope this makes more sense now.

    Thank you.

    Brendon

    Hi Andy,

    Thanks for getting back to me.

    However the code you provided is CSS code, and will hide it accross the entire site, including the blog.

    What I actually meant is how to stop the custom posts template from including all this info in the first place. We also don’t want the entire weight of the social sharing code to be loaded throughout our courses system, so just hiding it visually isn’t going to be an optimal solution.

    Something in the theme is causing the custom posts to be treated like blog posts, which is what we need to change.

    Thank you.

    Brendon

    in reply to: Website Width Change After Theme Update to 3.0.4 #355774

    Ha, we must have both realized that at the same time… LOL

    Thanks bud.

    in reply to: Website Width Change After Theme Update to 3.0.4 #355772

    Ok, so I’ve managed to narrow the issue down to the minify portion of the W3 Total Cache plugin.

    By disabling minify and then re-enabling it, it seems to have solved the problem.

    So for now, all is good, but I’ll update this thread if there are any other issues.

    Thank you for your help with this Josue.

    B

    in reply to: Website Width Change After Theme Update to 3.0.4 #355749
    This reply has been marked as private.
    in reply to: Website Width Change After Theme Update to 3.0.4 #355669

    Hi Josue,

    Thanks for getting back to me. This is very strange though, because it is still set at 1310px. So something else must be causing it. You can see an example of the narrower content here:

    http://www.inmotiongraphics.com/services/

    And here’s a screenshot of the settings:

    Screenshot of layout settings

    http://awesomescreenshot.com/0343w4ya29

    I even tried resaving the settings, but that didn’t help.

Viewing 25 posts - 1 through 25 (of 25 total)