php - How to get Post sidebar & footer including html like get_the_content() which only gets content section?

admin2025-06-05  2

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".

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749079856a316185.html

最新回复(0)