wp_guy
Forum Replies Created
-
Forum: Themes and Templates
In reply to: img padding not working in IEI do that by wrapping the image inside a div…. the div has the border and padding… The only problem is that you must specify the height and width of this div… or float it.
Forum: Themes and Templates
In reply to: Display one post from certain categoryTry adding
setup_postdata($post);right after your foreach lines… like this:$imposts = get_posts('numberposts=1&category=4'); foreach($imposts as $post) : setup_postdata($post); ?> <div class="post" id="home-page-featured-1"> <p class="subtitle">Lichen of the month</p> <h2><a><?php the_title() ?></a></h2> <?php the_content('<span class="readmore">...read more</span>'); ?> <div class="clear"></div> </div> <?php endforeach; ?> <?php $imposts = get_posts('numberposts=1&category=3'); foreach($imposts as $post) : setup_postdata($post); ?> <div class="post" id="home-page-featured-2"> <p class="subtitle">Have you seen this lichen?</p> <h2><a><?php the_title() ?></a></h2> <?php the_content('<span class="readmore">...read more</span>'); ?> <div class="clear"></div> </div> <?php endforeach; ?>Forum: Fixing WordPress
In reply to: Missing and additional line breaks<div></p>looks awfully wrong to me…Forum: Fixing WordPress
In reply to: removing calendar icons and more questions…Yeah… don’t remove the
</div>bitForum: Fixing WordPress
In reply to: Remove “leave a comment”Actually the code that whooami mentioned is found in archive.php for that theme.
@avon: WordPress 2.5 seems to have this feature already, no need for extra plugins.
I came up with some *ugly* code that will set a variable containing the list of specified tags… like “cows, horses and pigs” or “cows, horses or pigs”:
<?php $multitag = ""; $conjunction = ""; if($wp_query->query_vars['tag_slug__and']){ $the_tags = $wp_query->query_vars['tag_slug__and']; $conjunction = "and"; }elseif($wp_query->query_vars['tag_slug__in']){ $the_tags = $wp_query->query_vars['tag_slug__in']; $conjunction = "or"; } for($i=0;$i<count($the_tags);$i++){ $multitag .= $the_tags[$i]; if($i < count($the_tags)-2){ $multitag .= ", "; }elseif($i == count($the_tags)-2){ $multitag .= " $conjunction "; } } ?>You can put this somewhere in your tag.php or archive.php (before the title) and then output the title with:
<?php echo $multitag; ?>I know… my solution is a little bit messy and complicated… but I haven’t found any other solution.
Forum: Fixing WordPress
In reply to: removing calendar icons and more questions…You might want to delete those lines of code you mentioned, but from the page.php file instead of index.php.
Forum: Themes and Templates
In reply to: Sidebar problemYou can use the is_page() conditional tag… like this (in page.php):
<?php if( !is_page('forum') ) : ?> <?php get_sidebar(); ?> <?php endif; ?>Or you can use a custom page template where the <?php get_sidebar(); ?> doesn’t appear
Forum: Fixing WordPress
In reply to: Remove “leave a comment”Is it just the “leave a comment” text? no comments form?
Forum: Fixing WordPress
In reply to: Remove “leave a comment”If you don’t have a single.php… then index.php is used instead… do you see a “<?php comments_template(); ?>” in your index.php file?
Forum: Fixing WordPress
In reply to: how to query database?$wpdb->get_results returns an array of rows from the database (in your case, just one row), and each one of those rows is another array… so yes… it is right.
Forum: Fixing WordPress
In reply to: Remove “leave a comment”If you do not want to use the commenting feature at all… you can remove the code “<?php comments_template(); ?>” from the single.php file of your theme.
Forum: Fixing WordPress
In reply to: Display more than 45 tags?it seems that the “wp_tag_cloud()” function accepts a “number” parameter which default value is 45…
Forum: Themes and Templates
In reply to: Dynamic Stylesheet not picked upYou could leave the style.css with the basic info (theme name, author, etc.) and then add your second stylesheet in the header.php file. Just an idea…
Forum: Plugins
In reply to: Alex king fatal error Popularity ContestI wrote an article about this issue over here:
Popularity Contest plugin and WordPress 2.5
Hope it helps!