Articles of footer

Overwrite or Replace code in WP_Footer

I have a some code being dynamically added into my Footer via add_action(‘wp_footer’ …). Unfortunately I’m not sure how to remove it using conventional methods, I’ve looked at the following question and tried to use the solutions there: remove_action or remove_filter with external classes? But had no luck with any of the answers so now […]

My add_action (wp_footer, 'method') is not calling?

In my themes functions.php file I have put: add_action(‘wp_footer’, ‘method’); function method() { echo “this is being called”; die(); } My wordpress footer.php file looks like this: <?php wp_footer(); ?> </body> </html> What could be the reason my add_action hook is not being called? I can provide additional code or information if needed. EDIT: Instead […]

Change location of header.php and footer.php

I wish to organize the my themes directory a little more. Is it possible to move header.php and footer.php to a sub directory? I guess it’s done by hooking on to some action, but is it possible with just a config setting?

Why would this IF statement not work?

I’ve placed the following conditional statement in my footer.php file but it isn’t working. I want it to show the footer on every page except for single.php and the services.php template: <?php if (!is_single() || !is_page_template(‘services.php’)) {?> <footer>Content</footer> <?php } ?>

how to add an image to the footer?

so I am looking through some code that I did not write. It has this piece of code here: <nav id=”footer-nav” class=”span8 last”> <a href=”#”><button class=”footerButton”>Menu</button></a> <!–div class=”menu-button”>Menu</div–> <?php wp_nav_menu( array(‘menu’ => ‘Footer Menu’) ); ?> </nav><!– id=”footer-nav” –> What I am interpreting from this piece of code is that there is a footer menu […]

Where would I place `wp_footer();`?

I am currently working on the footer.php file. I am just wondering where I should place the wp_footer(); in relation to the <footer> elements. Which of the following would be correct? Method A: <footer> <h1>Title Text</h1> <p>Some text</p> <?php wp_footer(); ?> </footer> </body> </html> Method B <footer> <h1>Title Text</h1> <p>Some text</p> </footer> <?php wp_footer(); ?> […]

How to place script in footer?

I have a script I want to place in my site’s footer. It’s not actually a file, just a single line of code (the script source is located at an external URL). So my question is, should I enqueue the script or just copy and paste it into the footer?

Adding footers to posts?

I’m trying to add footers to the end of my posts. I need to be able to assign different footers to different posts (not globally). I tried using WP Post Footer, but it’s not working on WP 3.1.2.

Enqueue scripts in footer

I’m trying to build a plugin and enqueue my scripts to footer. For performance reasons I’d like to load this plugin scripts after the functions.php scripts, because furthermore it will break the page otherwise. I mean that in my functions.php there are essentials scripts like: jquery jquery-ui which are loaded in the header. Next I […]

Sharing Header Components Across Multisite

I have a multi-site platform and I’m trying to share the menu that I have in main with other sites that are located in different folders. This is the PHP tag in the main that pulls the menu which I also need in the header of other: <?php dokan_header_user_menu(); ?> I tried using it as […]