Wordpress loop


I was wondering if someone could help me with a 'if' statement in my wordpress loop.php file.

I wanted to have two different category layouts, so i placed the following 'if' statement in both my category.php and loop.php files to get the desired result.

<?php if (is_category('22') || cat_is_ancestor_of(22, $cat)) { ?>

//new layout here

<?php } else { ?>

//original layout here

<?php } ?>

However it works but my footer breaks on the new layout.

I have attached both files for you to see the code.

The original category layout is here:

The new blog layout so far is here:

Notice the footer. Hope someone could shine some light on the issue.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


I cant see a difference in the footer
Andy6350Author Commented:
This is what i have on my screen on the blog layout, see attached...
Andy6350Author Commented:
Can you see the difference now?
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

footer 2

I have refreshed
Andy6350Author Commented:
The problem is on this page:


at the bottom, the footer doesn't spread 100% of the screen

This page does:
Andy6350Author Commented:
Not sure if your seeing the issue i have or not
I am not seeing a problem but from your screen shot it looks like footer is inside wrapper. So possibly in your new-layout-here part you have forgotten to close a div.
Andy6350Author Commented:
found out that it was a duplicated content div tag

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andy6350Author Commented:
Found out it was a duplicated content div tag
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.