在获取要显示的正确小部件区域时出现问题


Having Problems Getting The Correct Widget Area To Display

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

我希望有人能帮我理清思路。

感谢

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');
}