Hardhat
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Static homepage menu questionHi all
Nailed it!
Just for clarity: I’m using a hacked about version of the Andreas Viklund theme WP-Andreas01.
Although Andreas’s theme features a sidebar, the code that dwzemens mentions is actually in the header.php file.
In that file (and following d’s instructions) the code I found was this:
<h2 class="hide">Main menu:</h2> <ul class="page"> <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?></a>">Home</li> <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> </ul>After trying a two options (php isn’t my fortΓ© at the moment, but I’m getting there!) I removed the following:
<li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?></a>">Home</li>In doing this I successfully removed the unneeded ‘Home’ link, but maintained the theme’s ability to highlight the current active page in the menu using CSS.
The only thing other folks may need to remember is that if, like me, you’ve worked up a number of different headers for different templates, but all are based on the theme’s original header.php, then you obviously have to go in and do the same surgery on those to replicate the success of the fix across the site.
And that’s it.
Although I consider this resolved I’ll leave this open for a day or so to see if anyone has any further comments on the matter.
But as I said: fixed π
Just a brief note to the continuing success of these support forums. I don’t know there’s anything similar with this regular successful depth of response.
Long live WP!
HardhatForum: Fixing WordPress
In reply to: Static homepage menu questionHi all
I’ll dig around and let you know the outcome.
Cheers for the input
Hardhat
Forum: Fixing WordPress
In reply to: Retrograding back to 2.0.5?Hi all
Many thanks for the assist π
To Calcifier:
I just wandered back as I’d forgotten to mark this question as resolved.
To put your mind at rest, it’s not someone else’s blog: it’s mine.
Do you really fly of the handle like that every time somone asks a straightfoward question? You just extrapolated a whole chain of events from that question.
While I appreciate the concern, I’m rather alarmed at your determination to run around pointing at ‘falling sky’.
Just FYI, but I think you went a bit too far there.
Hardhat
Forum: Developing with WordPress
In reply to: 2.0.6 kills plug insHi Moshu
Just skimming the ‘Advanced Search’ plugin that Handy mentioned, the plugin seems to designed great if you want to go to a specialist search page.
The advantage of the other plugins mentioned is that they work in conjunction with the default search box in the sidebar: ie: you don’t have to go to a seperate page to search.
Hopefully some fixes will become available from the developers or maybe there’s a WP tweak the WP guys can do.
I’ll watch for the time being.
Hardhat π
Forum: Developing with WordPress
In reply to: 2.0.6 kills plug insHi Peeps
For what it’s worth my copy of David Nagle’s ‘Search Pages 0.1’ plugin has snuffed it too.
Yesterday running on 2.0.5: all hunky dory on searching both static pages and posts. Today, posts only get searched, static pages don’t show.
Just FYI, I’m developing a site locally on my Mac using MAMP.
This is the first problem I’ve encountered with a WP upgrade in 4 months.
Anyone know how safe it is to retrograde?
Hardhat π
Forum: Themes and Templates
In reply to: New Page template and new CSS in existing themeHi Kat
I think we might be talking at cross purposes.
Firtsly: it’s a local installation for testing. It’s not online yet.
Secondly: I understand the hieratical call structure.
However my point is, if you have two page templates which contain exactly the same markup (eg:
# body, # contentetc) but which you want to look different under different style sheets, how can you chose to apply only one style sheet to a given page?I can guarantee this is my week for being superthick but I still don’t get it.
What I’m asking..and forgive for me for repeating..is how do I get to link stylesheet A to template A and on template B (which is an exact duplicate of A) get stylesheet B to load?
Remember I’m trying to do this without changing the page’s internal markup so that there is only
#bodyin both templates, not#bodyBin template B.Or, is the simple answer that I have to change the markup – eg
#bodyto#bodyBin template B – in order to trigger the correct style?I may wake tomorrow and it’ll all make sense…
Your forebearence is greatly appreciated.
H : )
Forum: Themes and Templates
In reply to: New Page template and new CSS in existing themeJust to add:
header77.php include this for it’s stylesheet link:
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
: )
H
Forum: Themes and Templates
In reply to: New Page template and new CSS in existing themeHi Kat
Ok: here’s what I’ve got in each:
Styles.css has:
/*
Theme Name: Foxx1
Theme URI:
Description:
Version: 1
Author: Hardhat
Author URI:
*/
@import "basic.css";
@import "77.css";
page77.php has:
<?php
/*Template Name: page77
*/
?>
<?php include ('header77.php'); ?>
I’ve made changes in 77.css to change the body copy to Times instead of Verdana and background colour is set to black instead of grey…but no change occurs.
Just curious, how does page77.php know to call 77.css over basic.css ?
Cheers
H
Forum: Themes and Templates
In reply to: New Page template and new CSS in existing themeOK: in advance, please forgive my massive dumbness:
I’m sorted on the whole
@importfor linking other stylesheets via style.css…If I understood correctly: I duplicated my existing stylesheet which I renamed basic.css…
In the original styles.css I then deleted all the style information and replaced it with the following:
@import "basic.css"That’s great because I’ve managed to move all the CSS rules for the majority of my site pages which are controlled by one template to an imported stylesheet.
So far, so cool…
Returning to my dilema…and with more clarity…
I’m working on a music related site.
The majority of the pages will be controlled by the default theme template page (ie: the page.php ).
Certain areas of the site will have the exactly the same layout as page.php but require different CSS (eg: font usage and background colours etc).
To give an example: one page is about the year 1977. To create a template for the main page and all sub-pages that relate to this page I’ve created a dulicated page.php and renamed it page77.php. I’ve also duped the default header.php to create header77.php (this is so that I can link the banner image to a different one for that era). Thus far I know the template side of things is working because it appears in my template list and I can create pages from it that look the same as the rest of the site but include the different image.
My problem now remains to call a new stylesheet (…shockingly called 77.css…) to pages created from the page77.php template.
I’m still not sure how to do this.
How do I employ KG’s
@importto do this, based on the concept of WordPress themes using one controlling style.css?I know this was a longwinded descrpition…and – believe it or not – I’m quite happy with XHTML and CSS…but know bugger all about php.
All help very much appreciated.
H
Forum: Themes and Templates
In reply to: New Page template and new CSS in existing themeHi KG
Sorry for the delay in responding.
I’ll try it within the next 24hrs : ).
Regards
Hardhat