carolineh
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Superfish menu using wp_list_pagesForum: Fixing WordPress
In reply to: WP adds empty <ul></ul> even when there is no custom field dataThank you, I’m so glad you didn’t delete this!
Exactly what I needed, hopefully this will be added in future versions.Forum: Themes and Templates
In reply to: How to only list pages if they have no childrenHi Michael, Thanks for the explanation and for solving my problem.
??
Forum: Themes and Templates
In reply to: How to only list pages if they have no childrenThanks Michael!
So you have said only display parent pages,
then for each page you have got all the children,
then said if there are no children display the list!That is amazing.
I was just having a look in the database, and was wondering what the post_parent numbers represent in the wp_posts table?
I’m also still a bit flumoxed by this part!
->
as in
('child_of='.$page->ID)
Thanks for your help ??
Forum: Themes and Templates
In reply to: How to only list pages if they have no childrenI was also trying something like this:
<?php $nochild = $wpdb->get_col("SELECT DISTINCT post_parent FROM $wpdb->posts WHERE $wpdb->posts.post_parent = 0 AND $wpdb->posts.post_type = 'page' AND $wpdb->posts.post_status = 'publish'"); foreach ($nochild as $nochildpage) { ?> <li><a href="<?php echo get_page_link($nochildpage->ID) ?>"><?php echo $nochildpage->post_title; ?> </a></li> <?php } ?>
using the code that displays only posts with children.
Forum: Themes and Templates
In reply to: How to only list pages if they have no childrenHi Michael,
I tried this:
<?php $pages = get_pages('parent=0'); foreach ($pages as $page) { ?> <li><a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title; ?> </a></li> <?php } ?>
but it gives me the same results as using the depth parameter in wp_list_pages.
parent
(integer) Displays those pages that have this ID as a parent. Defaults to -1 (displays all Pages regardless of parent). Note that this can be used to limit the ‘depth’ of the child_of parameter, so only one generation of descendants might be retrieved. You must use this in conjuction with the child_of parameter. Feed it the same ID.* -1 – default, no parent restriction
* 0 – returns all top level pagesFrom the get_pages reference,
I’m not sure if I’m using it in the wrong way! lolForum: Themes and Templates
In reply to: how to exclude one category from post linksOk, thanks, I’ll bear it in mind ??
Forum: Themes and Templates
In reply to: Please help me getting an image in my headerHey,
you have to hide your header text cus if you delete it it’s mess up with your SEO. So put the following div around your header in header.php, like so:<div id="hideheader"> <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1> <div class="description"><?php bloginfo('description'); ?></div> </div>
and add this into your style.css
#hideheader { display:none; }
So you are a band ?? I read your favourite bands, cool, shame I can’t read the rest of your site!
Forum: Themes and Templates
In reply to: how to exclude one category from post linksYeah, I think that I was wanting wordpress to do something it’s not really designed to do. So I’d probably need to set up a new blog database or something to avoid this? ‘cus what I want is really to completely separate 2 sets of content.
Forum: Fixing WordPress
In reply to: Content below sidebarsHey Sashira,
‘Div’s are like boxes that contain the information, and styles can be applied to these boxes to position them relative to each other. I’ve looked at your layout and it is basically this:
<div id="main"> <div id="content"></div> <div id="sidebar1"></div> <div id="sidebar2"></div> </div>
and normally if they are all floated left they will appear in their normal order, but your’s dont :s not sure why but post up everything in your style.css that has the following:
#content
#sidebar1
#sidebar2and it should start making sense ??
Forum: Themes and Templates
In reply to: how to exclude one category from post linksHi,
I’ve semi-resolved this. Instead of segregating my sections through categories, I’ve used pages and sub-pages. This also makes styling my navigation easier.I am still puzzled by my original question, and it will probably crop up again in the future!
Forum: Themes and Templates
In reply to: how to exclude one category from post linksThen work with Category Templates ? WordPress Codex for category pages that will, as a result, have previous and next links that work the way you want.
Could you point me towards some more specific documentation, I appreciate your help but I feel like I’ve already read through those and hundred other related pages inside out!
Perhaps a tutorial on a similar topic, I can’t seem to find, or don’t exactly know what I’m looking for.
Anybody reading this perhaps know what I’m talking about, please help ??
Forum: Themes and Templates
In reply to: how to exclude one category from post linksI don’t think I understand, where should I be using the standard loop and what do I put in the category template to cause the differentiation?
Thanks
Forum: Themes and Templates
In reply to: how to exclude one category from post linksNo, it’s how it is,
<?php query_posts($query_string . '&cat=-3'); ?>
I added the above to the top of my category.php to stop it displaying items from category 3, and it does this just not for the navigation. I tried putting the navigation inside the endwhile tag but no difference.
Really not sure, I was looking and saw the mention of adding to the functions.php, and this worked in the same way but didn’t stop the navigation.
Cheers
Forum: Themes and Templates
In reply to: Please help me getting an image in my headerI’m not sure why your header.php file isn’t appearing in your text editor but to add an image into your header you need to enter this into style.css
#header { background: url('images/WHATEVER.gif') no-repeat top left; height: ??px; }
make sure your image is in the wordpress images folder, you can change ‘left’ to ‘right’ or ‘centre’, and that you replace ??px, with whatever height your image is, in pixels.