admin管理员组

文章数量:1289857

I want to remove get_header and get_footer conditionally and temporary from all single pages with functions.php

i tried this remove action with conditions code but not works..

remove_action('get_header', 'wpx_remove_header', 1)

please suggest me best way to do that..

I want to remove get_header and get_footer conditionally and temporary from all single pages with functions.php

i tried this remove action with conditions code but not works..

remove_action('get_header', 'wpx_remove_header', 1)

please suggest me best way to do that..

Share Improve this question asked Jul 7, 2021 at 15:01 user208353user208353
Add a comment  | 

1 Answer 1

Reset to default 0

I am unsure how your site is set up, but typically the get_header and get_footer is called in a template file. If you are using the typical template hierarchy, then your single pages are using single.php and both get_header and get_footer can simply just be removed from that php file.

本文标签: How to remove getheader From all single pages in wordpress with functionsphp without plugin