Link to home
Start Free TrialLog in
Avatar of Andy6350
Andy6350

asked on

Wordpress loop

Hi,

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:
http://www.bluebean.org.uk/category/web-design-portfolio

The new blog layout so far is here:
http://www.bluebean.org.uk/category/blog

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

Thanks,

Andrew
category.php
loop.php
Avatar of IanTh
IanTh
Flag of United Kingdom of Great Britain and Northern Ireland image

er

User generated image
I cant see a difference in the footer
Avatar of Andy6350
Andy6350

ASKER

This is what i have on my screen on the blog layout, see attached...
blog.jpg
Can you see the difference now?
User generated image

no
I have refreshed
The problem is on this page:

http://www.bluebean.org.uk/category/blog/planning-your-website

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

This page does:
http://www.bluebean.org.uk/category/web-design-portfolio
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.
ASKER CERTIFIED SOLUTION
Avatar of Andy6350
Andy6350

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found out it was a duplicated content div tag