我发现答案是在我的函数中忽略了将 $post 放在全局中
我需要将页面 id 作为变量获取,以便可以在 switch 语句中将其用于不同目的。
我正在使用 WP 3.2 + Thesis 1.8 - 全新的。
我已经尝试了各种不同的代码,这些代码在运行标准主题的 WP 2.9 中运行良好,但没有运气。
我为此使用的任何代码都将写入 wp-content\themes\thesis_182\custom\custom_functions.php
我发现答案是在我的函数中忽略了将 $post 放在全局中
我需要将页面 id 作为变量获取,以便可以在 switch 语句中将其用于不同目的。
我正在使用 WP 3.2 + Thesis 1.8 - 全新的。
我已经尝试了各种不同的代码,这些代码在运行标准主题的 WP 2.9 中运行良好,但没有运气。
我为此使用的任何代码都将写入 wp-content\themes\thesis_182\custom\custom_functions.php