Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1164785

    Hi,

    the accordion tab #urls arent really seo friendly. google detect it as mutliple sites (because multiple URLs) and not as a single site.
    i need to completely remove all the urls like this #toggle-id-1, #toggle-id-2, #toggle-id-3, #toggle-id-1-closed … and so on.

    i dont need the prettier urls … i need to completely remove the urls
    is this possbile?

    This code didnt worked and its buggy … the page kept on loading (blinking, actually)
    function add_custom_target(){
    ?>
    <script>
    jQuery(window).load(function(){
    document.location.href = String( document.location.href ).replace( “#/”, “” );
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_target’);

    thx a lot for helping me out
    ak-muc

    • This topic was modified 5 years ago by ak-muc.
    #1165074

    Hey ak-muc,

    Thank you for the inquiry.

    This is possible, but you have to modify the wp-content\themes\enfold\config-templatebuilder\avia-shortcodes\toggles\toggles.js file directly. Comment out or remove line 82 and 121.

    82:

    location.replace(thisheading.data('fake-id') + "-closed");
    

    121:

    location.replace(thisheading.data('fake-id'));
    

    Best regards,
    Ismael

    #1165145

    Ok thx for youre reply … i need to delete them after every update or its possible within child theme?

    #1165443

    Hi,

    Thank you for following up.

    You can override the shortcode in the child theme. Please check the documentation below.

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    You have to modify the extra_assets function around line 77 and make it load the script from the child theme.

    function extra_assets()
    		{
    			//load css
    			wp_enqueue_style( 'avia-module-toggles', AviaBuilder::$path['pluginUrlRoot'] . 'avia-shortcodes/toggles/toggles.css', array( 'avia-layout' ), false );
    
    				//load js
    			wp_enqueue_script( 'avia-module-toggles', AviaBuilder::$path['pluginUrlRoot'] . 'avia-shortcodes/toggles/toggles.js', array( 'avia-shortcodes' ), false, true );
    
    		}
    
    

    Best regards,
    Ismael

    #1165455

    Ok thank You … i will try it

    #1165771

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1443888

    Hi Ismael

    Can you please be more specific about where to find the extra_assets?

    Best regards,
    Maja

    #1443896
    #1443947

    Hi Rikard

    Thank you for your reply.
    I have tried to add this code snippet to functions.php – add_theme_support(‘avia_template_builder_custom_tab_toogle_id’); – as the guide tells me to do. But unfortunately it doesn’t work.
    Is there any other solution that can help me remove toggle-id’s from the URL?

    Best regards,
    Maja

    #1444038

    Hi,

    The code will add a new field in the element options, so that you can name the anchors yourself.

    Best regards,
    Rikard

    #1444877

    Hi Rikard

    I have added the code snippet, but unfortunately a new field is not showing in the element options. But I don’t see the field “toggle sorting tags” either, so I don’t know if something is wrong? I’m working in the Enfold version 5.2.1.

    Best regards,
    Maja

    #1444906

    Hi Maja,

    Please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site. We’ll close this thread for now.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘remove all accordion tab # urls like #toggle-id-1, #toggle-id-1-closed …’ is closed to new replies.