Solved

Wordpress loop

Posted on 2012-03-23
10
455 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:Andy6350
  • 6
  • 2
10 Comments
 
LVL 30

Expert Comment

by:IanTh
ID: 37756494
er

err
I cant see a difference in the footer
0
 

Author Comment

by:Andy6350
ID: 37756519
This is what i have on my screen on the blog layout, see attached...
blog.jpg
0
 

Author Comment

by:Andy6350
ID: 37762441
Can you see the difference now?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 30

Expert Comment

by:IanTh
ID: 37762612
footer 2

no
I have refreshed
0
 

Author Comment

by:Andy6350
ID: 37762878
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
0
 

Author Comment

by:Andy6350
ID: 37767344
Not sure if your seeing the issue i have or not
0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 37788477
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.
0
 

Accepted Solution

by:
Andy6350 earned 0 total points
ID: 37805499
found out that it was a duplicated content div tag
0
 

Author Closing Comment

by:Andy6350
ID: 37822692
Found out it was a duplicated content div tag
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question