My footer disappeared and I have no idea why. Help?
-
Hi everyone,
I was doing fine with customizing my WordPress blog today. I was just fine tuning some code in my index.php & style.css files (didn’t even touch the footer) when all of a sudden I noticed my footer DIV went bye bye. I was messing around with some code in the index.php file but only related to the .comment DIV One of the last things I remember tweeking was some code related to the “.comment” div in the style.css file and the very last thing I remember doing was editing the “.searchbutton” div (i had gotten rid of the “text-indent:-9999px” so the text “search” would show up in the button).
The URL of my blog is:
Here is the index.php code:
[code moderated please put code in a pastebin and report link back here]
If you need anymore information or have any questions then let me know and I will provide. Thank you so much.
-
Not sure whether this is causing it, but your content is invalid. The line which ends in “criticism” has no closing paragraph tag, and then the next paragraph begins a new tag. You either need to close the tag or not open the new one. This might have had a cascading effect on your remaining content, obscuring the footer.
EDIT: The line ending in “Critics” has also been left open in error. Basically check all of your p tags, ensuring they are closed appropriately, and see if it reveals your footer!
Let me know
John
Ok well I got rid of that old post and added a new one but still no footer. The validator now says that I have only 12 errors. So there is an improvement there, down 8 errors from 20 errors.
And I do not understnad why my blog post does not show the paragraphs. It just plops all the text together in one big heap. Perhaps the problem there is in the <p> tag? Anyways, the priority now is the footer. How to get it to show.
Thanks for the help so far whooami and SpankMarvin 🙂
I just figured out that I needed to add this code to make paragraph spacing:
p {margin: 0px 15px 15px 15px; }
Now that minor problem is out of the way the footer can be dealt with.
UPDATE: I also went back into the “index.php” file and added some closing “p” tags and <p class=”postmetadata”> in front of some of the php code that is responsible for meta data. The validator tells me I only have 8 errors now. So it seems the <p> tag problem has been completely solved since no <p> errors are showing up in the validator.
Here is my updated code:
<?php get_header(); ?> <div id="content"> <div id="contentpadding"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="date"> <?php the_time('l, F jS, Y') ?> <!-- by <?php the_author() ?> --> </div> <div class="metadata"> Posted in <?php the_category(' / ') ?> </div> <div class="clear"></div> <?php the_content('read more... »'); ?> <div class="tags"> <p class="postmetadata"><?php the_tags('Tags: ', ' / ', '<br />'); ?></p> </div> <div class="comments"> <p class="postmetadata"><?php comments_popup_link('comment', '1 comment', '% comments'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div><?php next_posts_link('« Older Entries') ?></div> <div><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?> <?php endif; ?> </div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
one suggestion….in your footer.php file at the end
“</div>
</div
<?php wp_footer(); ?>
“
change to“</div>
<?php wp_footer(); ?>
</div>to determine if a plugin is doing something to the footer.
thanks viceng. i made that change but saw no change when reloading the page.
i should also mention that the “sidebar” is not showing up either. so the “footer” and “sidebar” are currently M.I.A.
sidebar.php
<div id="sidebar"> <div id="sidebarpadding"> <h2>archives</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <?php wp_list_categories('show_count=1&title_li=<h2>categories</h2>'); ?> <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> <?php } ?> <?php endif; ?> </div> </div>
A friend of mine pointed out that when they clicked on the h2 title permalink and went to the single.php page view the footer appeared.
Here is that link:
http://criticall.co.cc/critic-defined/
And here is the code to “single.php”
[code moderated please put code in a pastebin and report link back here]
Maybe there is a clue in there. I just am not advanced enough to find it.
Ok, they moderated out my single.php (where the footer does show up) code so I pastebinned it here:
And here is the index.php code (where the sidebar and footer do not show):
I’m having the exact same issue, so am going to follow this thread.
I have the get_footer() and the file footer.php in the theme dir, but it just wont show.
I tried disabling all plugins and testing for JS errors, but still nothing – it’s weird.defmax, one thing I noticed in your “single.php” code is you don’t actually get the sidebar – I couldn’t find
get_sidebar()
.Although that doesn’t resolve the footer issue or why it doesn’t work in the index,php where you do have the sidebar include function.
Having searched the net and this site, I don’t find many others with the same problem, which points to it being something specific to our code/blog install.
Although I’ve coded numerous WP themes now and know my way around the code very well.
- The topic ‘My footer disappeared and I have no idea why. Help?’ is closed to new replies.