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
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
ASKER
This is what i have on my screen on the blog layout, see attached...
blog.jpg
blog.jpg
ASKER
Can you see the difference now?
ASKER
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
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
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found out it was a duplicated content div tag
I cant see a difference in the footer