admin管理员组

文章数量:1130349

I want to get sidebar & footer including html of current post.

Then I want to check a "string" inside sidebar & footer. If "string" exits, I want to enqueue a custom script.

If anyone knows a function to do so, please help me. thanks

Note: following functions get just content section of a post. So please suggest a function which gets full html including head, body, sidebar, footer.

the_content();

get_the_content();

$post = get_post();
$post->post_content

One thing I know, I have to use stripos() to check "string".

I want to get sidebar & footer including html of current post.

Then I want to check a "string" inside sidebar & footer. If "string" exits, I want to enqueue a custom script.

If anyone knows a function to do so, please help me. thanks

Note: following functions get just content section of a post. So please suggest a function which gets full html including head, body, sidebar, footer.

the_content();

get_the_content();

$post = get_post();
$post->post_content

One thing I know, I have to use stripos() to check "string".

本文标签: phpHow to get Post sidebar amp footer including html like getthecontent() which only gets content section