开发者

Get numeric page id as variable in Wordpress 3.2 with Thesis Theme

Ive found the answer was that Neglected to put $post in global within my function

I need to get the page id as a variable so I can use it in a switch statement for varying purposes.

I'm using WP 3.2 + Thesis 1.8 - all brand spankingly new.

I've tried all sorts of different code that worked fine in WP 2.9 running a standard theme but no luck.

Any code I use for this will be written in wp-content\themes\thesis_182\custom\cu开发者_运维问答stom_functions.php


Why do you need page_id? You could just check

if ( is_page(<page_id>) ) {
.....
....
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜