doumen5491 2018-12-04 18:19
浏览 68
已采纳

回声知识库Wordpress插件的问题

I use echo KB WordPress plugin to show my website Faqs. but the problem is I have 7 different categories and plugin supports only 6 categories for displaying items in tabs layout and when you add 7th category its face automatically changes to the dropdown menu, not tabs. so I want to have 7 tabs without converting to the drop-down. I reviewed all PHP and JS files in this plugin and I found this JS file that I think is related to my problem ( where //dropdown begins) :

// Tabs Layout: switch to the top category user clicked on
    tabContainer.find( navTabsLi ).each(function(){

        $(this).on('click', function (){
            tabContainer.find( navTabsLi ).removeClass('active');

            $(this).addClass('active');

            tabContainer.find(tabPanel).removeClass('active');
            changePanels ( $(this).index() );
            updateTabURL( $(this).attr('id'), $(this).data('cat-name') );
        });
    });

    // Tabs Layout: MOBILE: switch to the top category user selected
    $( "#main-category-selection" ).change(function() {
            tabContainer.find(tabPanel).removeClass('active');
            // drop down
            $( "#main-category-selection option:selected" ).each(function() {
                var selected_index = $( this ).index();
                changePanels ( selected_index );
                updateTabURL( $(this).attr('id'), $(this).data('cat-name') );
            });
        });

    function update_query_string_parameter(uri, key, value) {
        var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
        var separator = uri.indexOf('?') !== -1 ? "&" : "?";
        if (uri.match(re)) {
            return uri.replace(re, '$1' + key + "=" + value + '$2');
        }
        else {
            return uri + separator + key + "=" + value;
        }
    }

6 categories and tabs layout is OK added 7th Category and it changes to drop-down menu

Echo Knowledge Base Plugin Download Page: https://wordpress.org/plugins/echo-knowledge-base/

</div>
  • 写回答

1条回答 默认 最新

  • dousi6192 2019-02-14 08:30
    关注

    I was wrong that it could be a javascript code that has limited the count of tabs layout. there was a PHP file in path: echo-knowledge-base\includes\features\layouts to remove this limitation you need to change this line of code

    if ( $nof_top_categories <= 6 ) 
    

    I've changed number 6 to 7 and my problem has been solved.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog