How to call a function on particular page like ‘contact-us’ from function.php of child theme
The problem is that you’re trying to use is_page(), a conditional function intended only to run adjacent to the query, too early. Try running your code inside a callback that 1) only fires on the front-end, 2) fires after the page has partially loaded. For instance, wp_head. function prefix_run_on_contact_us() { if( is_page(‘contact-us’)) { echo “hello … Read more