Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

wp_footer not called in front-page.php


  #1  
Old Jun 12, 2013, 09:18 AM
marklevine
 
41 posts · Jun 2010
I am using a custom front page, having added front-page.php in my child theme directory. The code is based on index.php from the Montezuma directory. I added some styles and a loop to create a special navigator at the top of the center column. Below the navigator there is a standard loop where I display the_content for the first three posts and the_excerpt for all the rest. (Note: I removed any template processing for this file by copying the code for postformat.php and inserting it directly into front-page.php.)

At the bottom of front-page.php, I call get_footer() which is correctly inserting footer.php into the bottom of the file. BUT! This is not calling wp_footer().

Symptoms include: the wordpress admin bar doesn't appear at the top of the front page for administrators. Also, scripts enqueued for the footer are not inserted into the php for the front page. This is breaking slideshows. This is all working properly for archive, single, and page pages which are served with the standard Montezuma index.php.

My expectation is that the call to get_footer() ought to result in a call to wp_footer() but this is not happening. I'm digging and digging and digging. I'm afraid I'll reach China before I figure out what my php is missing! Thanks for any suggestions.
  #2  
Old Jun 12, 2013, 09:22 AM
marklevine
 
41 posts · Jun 2010
By the way, if I manually add a call to wp_footer() below the call the get_footer(), the front-page.php file works correctly. However, I suspect that there is something wrong with my configuration because I believe that I should not have to make that call.
  #3  
Old Jun 12, 2013, 01:03 PM
juggledad's Avatar
juggledad
 
23,597 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Why are you doing this?
  #4  
Old Jun 14, 2013, 12:49 PM
jerryc
 
367 posts · Oct 2012
Florida
Try breaking what you're doing into smaller chunks. For example, take out your loop and all your special things, and see if you still have the problem. Then put things back in one at a time and see what's causing your problem.

Last edited by juggledad; Jun 15, 2013 at 11:41 AM.
  #5  
Old Jun 15, 2013, 09:35 AM
marklevine
 
41 posts · Jun 2010
@juggledad, I am migrating this client from an Atahualpa-based theme to Montezuma. I was using the feature of Atahualpa to show the first "n" posts in full text (the_content) and the remaining posts as excerpts. I could not find a way in Montezuma to replicate this so I built my own loop in a custom front-page.php. Within that loop, I count which post I'm on and use the_content() if I'm on the first page on one of the first three posts.

When I first tested front-page.php, I noticed that the WP admin bar didn't display. I tracked this back to the lack of a call to wp_footer(). But I read somewhere that the call to get_footer() ought to make the call down to wp_footer(). This is not happening in my template.

The site has launched at http://artsmeme.com

Last edited by juggledad; Jun 15, 2013 at 11:41 AM. Reason: appended a note
  #6  
Old Jun 15, 2013, 11:43 AM
juggledad's Avatar
juggledad
 
23,597 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
if you look at the physical 'index.php' you will see a call to wp-footer. If you are making a template, you need to add that in.
  #7  
Old Jun 15, 2013, 08:07 PM
marklevine
 
41 posts · Jun 2010
Thanks. I have already added a call to wp_footer() and I will keep it. I believed that I found some documentation that stated that a called to get_footer would suffice. I am satisfied that my code, as written, is correct.

Bookmarks

Tags
get_footer, wp_footer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the Function Called the_content() ? GRF Atahualpa 3 Wordpress theme 1 May 21, 2012 08:53 AM
wp_footer action mmqc2 Plugins & Atahualpa 9 May 12, 2012 09:04 AM
[SOLVED] Call to wp_footer() not made right before </body> - why? cymric Post-Kicker, -Byline & -Footer 2 Aug 23, 2010 08:29 AM
[SOLVED] Adding wp_footer before body tag Chester Post-Kicker, -Byline & -Footer 6 Jun 7, 2009 11:24 AM


All times are GMT -6. The time now is 01:24 PM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.