| | #1 |
| BACKLINK MOGUL War Room Member Join Date: 2008 Location: Warrior Forum
Posts: 743
Thanks: 40
Thanked 67 Times in 37 Posts
| Here's the code: ------------------------------------------ <?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo "<ul>"; wp_list_categories('orderby=id&depth=1&show_count= 0&title_li= &use_desc_for_title=1&child_of='.$this_category->cat_ID); echo "</ul>"; } } else { ?> <ul> <?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li> </ul> <?php } ?> ------------------------------------------ I'm unable to find as to where exactly is the error?:rolleyes: Can anybody help? Thanks in advance Bhupinder |
| |
| | #2 |
| Advanced Warrior War Room Member Join Date: 2010 Location: Melbourne, Australia
Posts: 688
Thanks: 367
Thanked 70 Times in 58 Posts
|
what is the exact error you are getting?
|
| |
| | #3 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Costa Rica
Posts: 164
Thanks: 63
Thanked 44 Times in 41 Posts
|
you have (2) php declarations: Code: <?php |
| I MARKET STUFF | |
| |
| | #4 |
| BACKLINK MOGUL War Room Member Join Date: 2008 Location: Warrior Forum
Posts: 743
Thanks: 40
Thanked 67 Times in 37 Posts
| |
| |
| | #5 | |
| BACKLINK MOGUL War Room Member Join Date: 2008 Location: Warrior Forum
Posts: 743
Thanks: 40
Thanked 67 Times in 37 Posts
|
Parse error: parse error, unexpected '}' in 2.php on line 18 | |
| |
| | #6 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: U.K
Posts: 197
Thanks: 5
Thanked 39 Times in 36 Posts
|
Bhupinder, You arent ending your while loop. <ul> <?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> |
| |
| | #7 |
| Advanced Warrior War Room Member Join Date: 2010 Location: Melbourne, Australia
Posts: 688
Thanks: 367
Thanked 70 Times in 58 Posts
| |
| |
| | #8 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Costa Rica
Posts: 164
Thanks: 63
Thanked 44 Times in 41 Posts
|
oh i was totally off-base with my answer, apologies! my excuse, it was late in the night |
| I MARKET STUFF | |
| |
|
| Bookmarks |
| Tags |
| code, error, lines, php, syntax |
| |