Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #791162

    Hi. I was reading about the above mentioned topic and observed that content hidden on my toggles was not shown in google snippets or was not being indexed properly. I am requesting a modification in toggles as shown on this enfold demo page: http://kriesi.at/themes/enfold/shortcodes/toggles-accordions/

    I want all toggles to remain open and automatically close after 3 seconds of page load. I also want your suggestion whether this will be better for my SEO. I am to use 3000-4000 words on one page so I want to keep everything tidy. The problem is that my keywords are also in that hidden content.

    Thanks

    #791245

    Hi there,

    The code below should keep all tabs open until a user clicks to close them

    function add_custom_script_1(){
    ?>
    <script>
    (function($){
    $(window).load(function() {
    	var toggler    = $('.toggler');
    	var togglewrap = $(toggler).next();
    	$(toggler).each(function(index, element) {
            $(togglewrap).css({
    			'display'   : 'block',
    			'position'  : 'static',
    			'visibility': 'visible',
    			'width'     : 'auto',
    			'z-index'   : 1,
    		});
    		
    		$(this).addClass('activeTitle');
        });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script_1', 1);

    The question on SEO…

    Back in 2016 google did update their webmaster policy around tabbed / hidden content…

    “Make your site’s important content visible by default. Google is able to crawl HTML content hidden inside navigational elements such as tabs or expanding sections, however we consider this content less accessible to users, and believe that you should make your most important information visible in the default page view.”

    Not good :(

    They did do a U-turn on this late last year and stated that tabbed / hidden content wouldn’t hurt SEO and would be indexed just with a lower authority than standard content. If you have content that is important it’s best to not hide it in any way especially if it has keywords in it. Hidding keywords away could be flagged as potential black hat.

    Personally the idea of keeping all the tabs open seems like a good one. It’ll allow users to see all content and collapse what isn’t relevant AND keeps google happy.

    3000 – 4000 words seems a little high but I don’t know the context of the page. People tend to turn off after reading a huge amount.
    Just my two cents :)

    Hope that helps

    TJ

    • This reply was modified 7 years, 6 months ago by tjswarbs78.
    #791281

    @tjswarbs78
    thanks for reply. i agree with you on all points. since the words are more, that is why i want to keep toggles open – until they close automatically after 3-5 seconds. you have mentioned code to keep toggles open, but i want them to close also – not manually by user, but automatically after a few seconds. how to do that?

    #791532

    How to automatically close the toggles after few seconds?

    Timed closing is my question.

    Can you change your code so that opened toggles close after 5 seconds?

    #791769

    Hi,

    Please add following code to Functions.php file in Appearance > Editor

    function av_close_toggles(){
    ?>
     <script>
    jQuery(window).load(function(){
    setTimeout(
      function() 
      {
        jQuery('p.toggler').removeClass('activeTitle');
        jQuery('.toggle_wrap').removeClass('active_tc');
      }, 5000);
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'av_close_toggles');

    Best regards,
    Yigit

    #791851

    Hi.
    I tried code by @Yigit and code by @tjswarbs78 and combined code of both.

    function av_close_toggles(){
    ?>
     <script>
    jQuery(window).load(function(){
    setTimeout(
      function() 
      {
        jQuery('p.toggler').removeClass('activeTitle');
        jQuery('.toggle_wrap').removeClass('active_tc');
      }, 5000);
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'av_close_toggles');

    and

    
    <?php
    
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file. 
    * WordPress will use those functions instead of the original functions then.
    */
    
    function add_custom_script_1(){
    ?>
    <script>
    (function($){
    $(window).load(function() {
    	var toggler    = $('.toggler');
    	var togglewrap = $(toggler).next();
    	$(toggler).each(function(index, element) {
            $(togglewrap).css({
    			'display'   : 'block',
    			'position'  : 'static',
    			'visibility': 'visible',
    			'width'     : 'auto',
    			'z-index'   : 1,
    		});
    		
    		$(this).addClass('activeTitle');
        });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script_1', 1);
    
    function av_close_toggles(){
    ?>
     <script>
    jQuery(window).load(function(){
    setTimeout(
      function() 
      {
        jQuery('p.toggler').removeClass('activeTitle');
        jQuery('.toggle_wrap').removeClass('active_tc');
      }, 5000);
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'av_close_toggles');
    

    But if toggles are already open, they do not close.

    I think even 3 or 4 auto clicks on toggles can work too.

    I don’t know java script. Just guessing. Please help me on this. Giving you admin passwords

    • This reply was modified 7 years, 6 months ago by Zatara.
    #792234

    Hi!

    I removed other code and left only mine and created a private testing page. It works there.

    Regards,
    Yigit

    #792243

    After seeing “only your code” work, i want to re-phrase the question –
    1. When page loads, i want all toggles to be open.
    2. 5 seconds after page load, they all should close.

    What your code does –
    1. All toggles remain closed on page load.
    2. If i open a toggle, it closes automatically.
    This is not what I want.

    Please provide code again. Thanks a lot for the efforts.

    #792274

    did it this way

    <?php
    
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file. 
    * WordPress will use those functions instead of the original functions then.
    */
    function add_custom_script_1(){
    ?>
    <script>
    (function($){
    $(window).load(function() {
    	var toggler    = $('.toggler');
    	var togglewrap = $(toggler).next();
    	$(toggler).each(function(index, element) {
            $(togglewrap).css({
    			'display'   : 'block',
    			'position'  : 'static',
    			'visibility': 'visible',
    			'width'     : 'auto',
    			'z-index'   : 1,
    		});
    		
    		$(this).addClass('activeTitle');
        });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script_1', 1);
    
    function av_close_toggles(){
    ?>
     <script>
    jQuery(window).load(function(){
    setTimeout(
      function() 
      {    
    jQuery('p.toggler').removeClass('activeTitle');
    jQuery('.toggle_wrap').removeClass('active_tc');
    jQuery('.toggle_wrap').css({
    			'display'   : 'none',
    			'position'  : 'static',
    			'visibility': 'visible',
    			'width'     : 'auto',
    			'z-index'   : 1,
    		});
      }, 6000); 
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'av_close_toggles');
    
    #792494

    Hi,

    IS that done?
    Does it work properly for you?

    Best regards,
    Basilis

    #792516

    Yes. It works. Thanks for support.

    #792640

    Hi,

    We glad that your problem was solved!

    Let us if you need some assistance :)

    Best regards,
    John Torvik

    #903843

    Any ideas how to make tab section indexable?
    Thanks in advance!

    #903868

    Tab sections are indexed by google. Only the value of data remains low. While a visible content may rank on google, tabbed content may have difficulty in ranking.

    #904488

    Hi,

    There is not an easy way to go through it we are afraid.
    not possible to go through it a searchable way.

    Best regards,
    Basilis

    #907346

    Thanks! Will try to avoid these elements.

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.