Advanced Custom Fields for Header that are Editable from a Page [closed]

Assuming you are working with a theme supporting the WP customizer: Using the customizer.php file (can be found in sub-folder ‘inc’, or perform a search, varies from theme to theme. Make you own = Customizer API) So, in your customizer.php – Add this: // Add to customizer.php inside function your_customizer($wp_customize) {} $wp_customize->add_setting( ‘live_in_ctc’, array( ‘default’ … Read more

Custom Headers on Blog Posts Page

If the conditional works when using is_page( ‘products’ ), but does not work when using is_page( ‘blog’ ), then that means that WordPress isn’t finding a static page with the slug blog. First thing to do: verify your slug name. A second alternative is that the static page blog is using a custom page template, … Read more

How do I show a button only on my custom template page?

It’s as simple as doing a conditional and check if you are on home. What you are looking for is is_page_template( );. Wrap your button inside it as follows: <?php if( is_page_template( ‘your-template-slug.php’ ) ){ ?> <button name=”button” style=” … ” value=”OK” type=”button”>HAVE A QUESTIONS</button> <?php } ?>

Cannot get custom javascript to execute on page

Try this. add_action ( ‘wp_head’, ‘custom_script_hook’); function custom_script_hook() { ?> <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”></script> <?php $output=”<script> jQuery(document).ready(() => { $(“div#tm-extra-product-options”).click(() => { console.log(“it working!”) }); }); </script>”; echo $output; }

wp_redirect() is not working

Add ob_start(); at the top of functions.php file and remove from your code. As WP is a combination of plugin and core files and we don’t know which code sends the throws the header sent warning. And we know that functions.php is called every time we made a request to server, so this is the … Read more