【问题标题】:Having Problems Getting The Correct Widget Area To Display无法正确显示要显示的小部件区域
【发布时间】:2013-12-04 01:53:11
【问题描述】:

我可能错过了一些东西,但我一直在努力弄清楚是什么,但我没有运气。 我在我的 wordpress 网站中添加了一个新的页面模板,创建了一个新的小部件区域(这是必要的,因为这是原始设计师构建网站的方式)。 但是,该页面似乎正在从另一个小部件区域调用内容。 有问题的页面是http://www.haylockpittman.co.uk/builders-painters-decorators-and-refurbishment-contractors-surrey/,它似乎正在调用小部件区域“New Paint”,尽管代码调用“paint surrey”,其中包含小部件区域的正确文本。 请注意,小部件区域基本上是页面的下半部分。

我希望有人能帮助我解决这个问题。

谢谢

【问题讨论】:

    标签: php css wordpress widget


    【解决方案1】:
    As you have created a separate sidebar, now you must be seeing that in your admin panel.
    
    So just add the widgets you want to appear in the sidebar.
    
    Next go to your sidebar.php page, there you cana put a condition i.e. for the products page
    
    If your products page is a separate template then use the name of the file i.e.
    
    if ( is_page_template('your-template.php') ) {
        register_sidebr('name of the sidebar');
    } else {
        register_sidebr('name of the sidebar');
    }
    

    【讨论】:

      猜你喜欢
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-11
      • 2014-03-14
      相关资源
      最近更新 更多