soundproofskin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: No admin sidebar, no publish/save buttonUpdate on my problem – I get the right column to save and publish when editing ‘pages’ but it isn’t there when working on ‘posts’. Please help!
Forum: Fixing WordPress
In reply to: No admin sidebar, no publish/save buttonCan anyone help with this?
Forum: Fixing WordPress
In reply to: No admin sidebar, no publish/save buttonHi, this just suddenly happened to me out of the blue – is this a common thing that has a regular fix?
Forum: Fixing WordPress
In reply to: So slow…Another weird thing, I can’t get it to load in firefox at all this morning, but it’s working sometimes in IE7. Needless to say, that’s not been the case before yesterday.
Forum: Fixing WordPress
In reply to: Display number of posts in category for current yearAnyone?
Forum: Fixing WordPress
In reply to: using is_page with children pages?I’ve made some progress – I can get it almost to work! The problem is that it is now showing all the different intoductions under one another, rather than just showing the one according to the page/child I am on.
Here’s the header.php code:
<!-- About us --> <?php if (is_superparent('2')) : ?> <h1>About us</h1> <p>The essentials about our purpose, who we work with, how we're organised, our policies, history - and how to contact us when it's not an emergency.</p> <?php endif; ?> <!-- Hill safety --> <?php if (is_superparent('23')) : ?> <h1>Hill safety</h1> <p>Prevention is better than rescue. We have put together some resources for your use on this page to help you be self reliant in wild and remote places.</p> <?php endif; ?> <!-- Support us --> <?php if (is_superparent('16')) : ?> <h1>Support us</h1> <p>As a charity wholly serviced by unpaid volunteers, we rely on your all round support to keep operating. These are the different ways you can contribute.</p> <?php endif; ?>
Here’s the functions.php code:
function is_superparent($parentid) { if (is_page('2')) return true; else { while ($parentid) { $page = get_page($parentid); $parentid = $page->post_parent; if ($parentid=="2") return true; } return false; } }
Can anyone help?
Forum: Fixing WordPress
In reply to: using is_page with children pages?Thanks for getting back to me.
I’ve tried playing with that code but the best I can get is for it to work on the actual page with the ID of ‘2’ – the children and children thereof are blank. Here’s exactly what I have done…
In my header file:
<?php if (is_superparent('2')) : ?> <h1>About us</h1> <p>The essentials about our purpose, who we work with, how we're organised, our policies, history - and how to contact us when it's not an emergency.</p> <?php endif; ?>
In my functions.php:
function is_superparent($parentid) { if (is_page('2')) return true; else { while ($parentid) { $page = get_page($parentid); $parentid = $page->post_parent; if ($parentid=="2") return true; } return false; } }
Any idea what’s wrong?
Forum: Fixing WordPress
In reply to: using is_page with children pages?Bump!
Forum: Fixing WordPress
In reply to: using is_page with children pages?Hi Otto or anyone out there, the description in the post above is exactly what I need for a website I am working on –
“This will check any number of levels. If the post, it’s parent, it’s grandparent, etc, has the given ID, it returns true.”
Unfortunately, being a designer and not much of a coder, I’m really struggling to implement the code into my site. Here’s the code I have at the moment which displays a different heading depending on which page the user is on:
<h1> <?php if (is_page(13)) echo "Welcome to the website" ?> <?php if (in_category(12)) echo "News and Updates" ?> <?php if (in_category(13)) echo "On Call" ?> <?php if (is_page(2) || $post->post_parent=="2") echo "About us" ?> </h1>
The about us page has children and grandchildren. I basically want the title to remain the same on the page if you are a couple of levels in. Can anyone help me incorporate the code above into my code?
Forum: Fixing WordPress
In reply to: if (is_page & childrenbump.
Forum: Fixing WordPress
In reply to: Expand Page submenu items for current page OnlyI have a similar issue. My navigation is like so:
Page 1
Page 1 child a
Page 1 child bPage 2
Page 2 child a
Page 2 child bNow if I am on Page 1 I want the children of page two to be hidden like so:
Page 1
Page 1 child a
Page 1 child bPage 2
If I use the code above, I get the child pages of the particular page I am on, but I have no control over where it appears – so if I put the code under page 1 and click on page 2 I get this:
Page 1
Page 2 child a
Page 2 child bPage 2
Sounds confusing I know but I can’t explain it any other way. basically I need to know if there is a way of displaying the children of a page directly underneath the parent when there is more than one parent page?
Thanks in advance!
Forum: Your WordPress
In reply to: New K2 PhotoblogLooks very very nice on my laptop monitor, certainly like the darkness, wouldn’t change it from what I see at this end ??
Forum: Fixing WordPress
In reply to: A little advice & ressurance for a newbieHmm, just thinking though – I change the style of the index html, that doesn’t carry through to the rest of the site… are there a bunch of particular php files that I should edit so that, for example, the archives, post page, about me page all has the same html as my homepage?
Thanks in advance!
Kelly