Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Wordpress loop

Posted on 2012-03-23
10
Medium Priority
?
468 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
While Plesk offers many potential benefits to website administrators, including compatibility with Windows Server and other leading technologies, the company has also been working to differentiate it from other control panels for content management…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

971 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