• Resolved sun1985

    (@sun1985)


    – на этом сайте был использован данный плагин, но при вставке HTML-кода (НЕ SHORTCODE), переключения не происходит

    <ul id="tabs" class="tabs">
    
    <li><a href="#tab-1">1-местный</a></li>
    <li><a href="#tab-2">2-местный</a></li>
    <li><a href="#tab-3">2-местный (улучш.)</a></li>
    <li><a href="#tab-4">3-местный</a></li>
    <li><a href="#tab-5">4-местный</a></li>
    					<section id="tab-1" class="tab active">
    						<?php query_posts('page_id=119' );
    						if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    						<?php the_content(''); ?>
    						<?php endwhile; else:
    						endif;
    						wp_reset_query();
    						?>
    					</section><section id="tab-2" class="tab">
    						<?php query_posts('page_id=120' );
    						if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    						<?php the_content(''); ?>
    						<?php endwhile; else:
    						endif;
    						wp_reset_query();
    						?>
    					</section><section id="tab-3" class="tab">
    						<?php query_posts('page_id=121' );
    						if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    						<?php the_content(''); ?>
    						<?php endwhile; else:
    						endif;
    						wp_reset_query();
    						?>
    					</section><section id="tab-4" class="tab">
    						<?php query_posts('page_id=122' );
    						if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    						<?php the_content(''); ?>
    						<?php endwhile; else:
    						endif;
    						wp_reset_query();
    						?>
    					</section><section id="tab-5" class="tab">
    						<?php query_posts('page_id=123' );
    						if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    						<?php the_content(''); ?>
    						<?php endwhile; else:
    						endif;
    						wp_reset_query();
    						?>
    					</section>

    Что не так???

    https://wordpress.org/plugins/tabs-shortcodes/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    Correct me if my translation is incorrect, but I think you are asking why the tabs won’t work when you do not use the actual shortcodes and instead hard code the HTML into the page?

    The reason for this is because the plugin relays on the shortcodes being present in the page content in order to determine whether to load the JavaScript file or not. If the shortcode isn’t used on the page, the necessary tabs JavaScript file doesn’t load. You will not be able to use the plugin without using the actual shortcodes.

    Thread Starter sun1985

    (@sun1985)

    В таком случае подскажите пожалуйста, как и какие JS подключать необходимо, т.к. не имею возможность использовать ShortCode. Спасибо

    Thread Starter sun1985

    (@sun1985)

    Я нашел что необходимо подгружать. Спасибо. Отличный плагин.
    Результат работы вы можете посмотреть Цены номеров в гостинице Питера

    Plugin Author philbuchanan

    (@philbuchanan)

    You just need to add the tabs.min.js file from the plugin folder. Please keep in mind that if the plugin gets updated things may break using this method. Good luck with it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Не работает при использовании HTML’ is closed to new replies.