markdw
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Help with double single php’sIs it not because the if is looking for a file called lpsingle.php?
Shouldn’t it read:
<?php $post = $wp_query->post; if ( in_category('762') ) { include(TEMPLATEPATH . '/single.php'); } else { include(TEMPLATEPATH . '/single1.php'); } ?>Just a thought
Forum: Themes and Templates
In reply to: how to Upload theme via ftp?Uploading via FTP is independent of wordpress. You need an FTP username and password as well as the hostname from your host. You use these with an FTP program. I use the FTP inside Dreamweaver 8.
Forum: Themes and Templates
In reply to: CSS Problems with page not in centreThanks for the advice but that doesn’t seem to do he trick. It is the container that need to sit centralling on the page and that already has margin: auto on the div style.
I have tried give the top-banner and footer-wrap wdiths of 100% with no luck either.
Any other ideas would be appreciated. The same thing (and other wierd IE7 bugs) are happening at another of my sites educationthemes.co.uk.
Thanks
Forum: Themes and Templates
In reply to: Spacing of category title and postYour h2 tag on line 327 of your style.css file has got a 30px top margin. Make this less and you are sorted!
Forum: Themes and Templates
In reply to: Spacing of category title and postyou just need to adjust the padding and the margins on the div’s i would think but without a link to your site it is difficult to diagnose
Forum: Plugins
In reply to: Show Random Posts Custom FieldsFinally figured it out. I am using the following code and it is working:
<?php $rand_posts = get_posts('cat=3&numberposts=1&orderby=RAND()'); foreach( $rand_posts as $post ) : ?> <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "homeimage", true); ?>" alt="<?php echo get_post_meta($post->ID, "Theme Name", true); ?> homeimage" /></a> <?php endforeach; ?>So just to clarify this brings in the random post form category number 3. It shows 1 post and only shows the custom field names ‘homeimage’ which is an image. This image then links to the post itself.
Hope this helps others.
Forum: Plugins
In reply to: Show Random Posts Custom FieldsYes definitely more than one post in the category. Don’t worry as I have made these simple errors before.
I will have to have a play and maybe change the way that the database is queried?
Forum: Plugins
In reply to: Show Random Posts Custom FieldsThanks for that but it doesn’t seem to work for me. I am not getting any errors but it still just displays the most recent post from that category.
Any ideas?
Forum: Themes and Templates
In reply to: Broken Themes: Stylesheet is Missing!Is there an index.php file in your theme?
It needs one in order to work, as that is what it means when it says there needs to be a template.
Forum: Fixing WordPress
In reply to: Static homepage… need another page to display blog postsYou need to create a blank page – with nothing in (I call my page blog) and then set this page to be the posts page where you set your static page in the admin section.
It is under where it says:
Front page displays = A static page (select below)
set front page to be the page you want your home page to be and posts page the page that you want to diaplay your weblog posts.check out one of my sites (www.ribbweb.org/ict) which does the same. ‘Home’ acts as the homepage and ‘Blog’ acts as my weblogs posts page.
Forum: Fixing WordPress
In reply to: What Happen to the Category IDs in 2.5?Just hover your mouse over the categories title on the manage>categories page and the ID is shown in the link – at the end where is says &cat_ID=
Forum: Plugins
In reply to: Show Random Posts Custom FieldsSorry I pasted the wrong piece of code (that was the div above!) Here it is:
<?php $recent = new WP_Query("cat=1&showposts=1"); while($recent->have_posts()) : $recent->the_post();?> <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="<?php echo get_post_meta($post->ID, "Theme Name", true); ?> thumbnail" /></a> <?php endwhile; ?>Forum: Themes and Templates
In reply to: Recommend me a themeI am about to release a theme shortly which may work for you
preview it below:Forum: Themes and Templates
In reply to: Posts from Selected Categoriessorry this editor is playing up. Try this code:
<?php $recent = new WP_Query("cat=22&showposts=10"); while($recent->have_posts()) : $recent->the_post();?> <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php endwhile; ?>Forum: Themes and Templates
In reply to: Posts from Selected CategoriesYou could use the following code (see entry below)