Solved

Wordpress loop

Posted on 2012-03-23
10
457 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

860 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