roburdick
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: trouble calling style sheet for a particular categoryThat Plugin did not work with my child theme. There is probably a fix, but I found a plugin free way:
I Ended up using this code in my single.php (right at the top) change TEMPLATEPATH to STYLESHEETPATH:
‘
<?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
?>
<?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
if (file_exists(STYLESHEETPATH.”/single-$currentcat”.”.php”)) {
include(STYLESHEETPATH.”/single-$currentcat”.”.php”);
} else {
?>’Remember to put this right at the bottom:
‘
<?php } ?>
‘http://wordpress.org/support/topic/344132?replies=3
http://www.webloglines.com/blog/stuff/article/wordpress_single_post_templates.php
http://lists.automattic.com/pipermail/wp-hackers/2009-May/026282.htmlForum: Themes and Templates
In reply to: Child Theme Post Templateschange TEMPLATEPATH to STYLESHEETPATH
I Ended up using this code in my single.php (right at the top):
‘<?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
?>
<?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
if (file_exists(STYLESHEETPATH.”/single-$currentcat”.”.php”)) {
include(STYLESHEETPATH.”/single-$currentcat”.”.php”);
} else {
?>’remember to put this right at the bottom
‘<?php } ?>’
http://wordpress.org/support/topic/344132?replies=3
http://www.webloglines.com/blog/stuff/article/wordpress_single_post_templates.php
http://lists.automattic.com/pipermail/wp-hackers/2009-May/026282.htmlForum: Themes and Templates
In reply to: Child Theme Post TemplatesI have exactly the same issue!
http://www.robertburdick.comForum: Fixing WordPress
In reply to: trouble calling style sheet for a particular categoryThanks SS_Minnow,
I still can’t seem to be able to apply a stylesheet.
Also I am having to put my category-3.php template into my parent theme (thematic). I would rather have it in my child theme which should work. If anyone know what I might be doing wrog, I would really appreciate it.
Forum: Fixing WordPress
In reply to: trouble calling style sheet for a particular categoryhttp://txfx.net/wordpress-plugins/force-category-template/
This plugin sorted my troubles… so much time wasted!
Forum: Fixing WordPress
In reply to: trouble calling style sheet for a particular categoryOh and this code is in functions.php. It has always done the trick for me in the past. Maybe it’s not possible with categories?
Forum: Fixing WordPress
In reply to: current page item not workingHi Inspired2Write,
Thanks for your suggestion. It does work with the default theme.
I didn’t figure out why my thematic based child them was misbehaving.
The only difference from other pages on my menu is that it’s made up of posts from a selected category. Should still work by my logic… It’s still a page after all.
Anyway, I added this css to fix it (applied only to the page current_page_item was not working):
‘
li.page-item-75 {
border-style:none;
background-image:url(“images/bg-hatch.png”);
background-repeat:repeat;
}
‘NOTE: I was trying to style the
- part of my markup, due to the way the design worked. I found several solutions using this type of css fix, but kept forgetting to specify the style for the
- part.
Forum: Themes and Templates
In reply to: Creating a hover caption on thumbnailsI found a post that sorted this out for me. Pop this bit of code in your functions.php file (for child themes set up):
‘
// caption for thumbs
function monahans_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr)
{
$attachment =& get_post($post_thumbnail_id);// post_title => image title
// post_excerpt => image caption
// post_content => image descriptionif ($attachment->post_excerpt || $attachment->post_content) {
$html .= ‘<p class=”thumbcaption”>’;
if ($attachment->post_excerpt) {
$html .= ‘<span class=”captitle”>’.$attachment->post_excerpt.'</span> ‘;
}
$html .= $attachment->post_content.'</p>’;
}return $html;
}add_action(‘post_thumbnail_html’, ‘monahans_thumbnail_caption’, null, 5);
‘
Forum: Fixing WordPress
In reply to: Display caption with the_post_thumbnailThis seems to work if you use functions in a child theme.
Forum: Fixing WordPress
In reply to: Adding a Rollover effect to POST THUMBNAILSMe too!
Forum: Themes and Templates
In reply to: IE7 div wrapping all preceding contentOK, as usual when I post something like this, I have just fixed my problem… I simply wrapped my last li button in a div.
final version:
http://www.pretty-clever.co.uk/open-house-dining/open-house-dining-menus
Ok I fixed it myself… the old re-install chestnut!
Deleted shopp and replaced with a freshly downloaded unzipped copy, then copied over the .css file i had modified
Forum: Themes and Templates
In reply to: CSS stylesheet to apply on static posts page.Found a solution:
in the funtions.php file I added another stylesheet rule like this:
if(is_home() )
$stylesheet_uri = $stylesheet_dir_uri . ‘/stylesheet_name.css’;The reading setting makes your posts page a ‘home’ page. Luckily this has not affected my actual home page (the drop down otion above in the reading settings panel). My home page has another stylesheet applied to it.
For anyone wanting to see my exact function snippet to apply different stylesheets, here it is:
// PAGES CSS
add_filter( ‘stylesheet_uri’, ‘my_stylesheet’, 10, 2 );function my_stylesheet( $stylesheet_uri, $stylesheet_dir_uri ) {
if(is_home() )
$stylesheet_uri = $stylesheet_dir_uri . ‘/style-about.css’;
if ( is_page( ‘team-building’ ) )
$stylesheet_uri = $stylesheet_dir_uri . ‘/teambuild.css’;
if ( is_page( ‘the-canape-challenge’ ) )
$stylesheet_uri = $stylesheet_dir_uri . ‘/teambuild_cat.css’;
elseif ( is_page( ‘Contact form’ ) )
$stylesheet_uri = $stylesheet_dir_uri . ‘/form.css’;return $stylesheet_uri;
}Forum: Plugins
In reply to: excerpt with imageThink i found a plugin for this problem.
http://www.cnet.ro/wordpress/thumbnailforexcerpts/
I also had to modify the content-extensions.php found in library/Extensions of Thematic theme folder. I realise this is not best practise for upgrades, so if anyone could tell me how to do this using my child theme funtions.php i would be very grateful.
I changed this bit:
if (is_home() || is_front_page()) { $content = 'excerpt';from the original:
if (is_home() || is_front_page()) { $content = 'full';Here is the full code
//creates the content function thematic_content() { if (is_home() || is_front_page()) { $content = 'excerpt'; } elseif (is_single()) { $content = 'full'; } elseif (is_tag()) { $content = 'excerpt'; } elseif (is_search()) { $content = 'excerpt'; } elseif (is_category()) { $content = 'excerpt'; } elseif (is_author()) { $content = 'excerpt'; } elseif (is_archive()) { $content = 'excerpt'; } $content = apply_filters('thematic_content', $content); if ( strtolower($content) == 'full' ) { $post = get_the_content(more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } elseif ( strtolower($content) == 'excerpt') { $post = get_the_excerpt(); } elseif ( strtolower($content) == 'none') { } else { $post = get_the_content(more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } echo apply_filters('thematic_post', $post); } // end thematic_contentForum: Themes and Templates
In reply to: Using a page template to show ‘a page of posts’Thanks, it turns out after a reinstall of thematic and doing exactly as you said it all works now. I must have done something to me copy of thematic, although I was using a child theme and trying not to touch the files in thematic other than a bit of copy and paste!
Anyway resolved, anyone else suffering a similar block, I would say try a re-install of the parent theme.
Rob 🙂