ifelse
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Though It Shows Up, the RSS Feed not WorkingIt’s a known bug. There’s a temporary workaround and is likely to be fixed in the next release.
Forum: Fixing WordPress
In reply to: simple way to limit the number of returned posts?!Try the following:
query_posts('posts_per_page=5');
I’d written a post on using it to display only one page but it’ll work perfectly well for you.Forum: Themes and Templates
In reply to: Comment styling & ValidationYep e.g.
<?php foreach ($comments as $comment): ?><div class="count">#<?php comment_ID(); ?>:</div>Forum: Themes and Templates
In reply to: Comment styling & Validation“This creates the count, but doesn’t do it sequentially for the site”
Ahh… Didn’t read that part:-)Why don’t you use the comment_id which is a unique sequentially allocated identifier (eg.
<?php comment_ID(); ?>)?Forum: Themes and Templates
In reply to: Comment styling & Validationjust out of curiosity, was there a reason for using span, rather than div?
I forget:-)
Any tips for question 2) phu?
The numbering of comments is done implicitly as the comments are defined as an ordered list. Unfortunately, most browsers (AFAIK) don’t provide the css support required to style these. Hence, your best bet is to do the following:1) suppress the numeric display (list-style-type:none).
2) Manually keep a counter variable that increments through the comments loop i.e. $commentcount++.
3) Using this counter, mark this up as<span class="commentcount"><?php echo $commentcount; ?></span><br />
4) Style this appropriately in your css.Forum: Themes and Templates
In reply to: Comment styling & Validation..or you can use divs instead of spans i.e.
<div class="commentbody"><p>Change this within the theme’s comment file.
Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5Sure Jinsan, here’s a quick intro.
Query posts enable various advanced functionality without the use of plugins.
Some examples of how I’ve exploited it on my site:
- Retrieve the content for the latest post or even a WP “Page” and always show that on the top of your home page in one style. Underneath that, then show the usual chronological blog posts in a different style.
- Show the usual blog posts in the main body. On the same page (perhaps on the sidebar), show miniposts/asides/shorts without the use of a plugin
- Make the homepage only display the content that you want without affecting other pages i.e. you can show only the latest post on your home page but still show 10 posts in your archives, search, category pages
- Make your archive page show all the entries without pagination.
This list really only scratches the surface of what you can do. There are a few sites that I know of that demonstrate these features. There’s my own site:-), Root’s site, SomeFoolWithA and probably a few others which I’ve forgotten.
Why not use a plugin to do this? As this is WP functionality, you can write a theme which will work without needing any plugins to be activated i.e. portability.
In addition, WP provides you this functionality out of the box. Why not leverage it and keep things simple?
Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5“I’ve been putting off the Codex query_post page for too long, so I’m going to steal…er, adapt your post for some of it”
By all means Kafkaesqui, go ahead. Saves me the work of doing so:-)Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5Thanks. For the arguments stuff, I had to go through the source code itself as there wasn’t any info available at all. Though I’d save everyone else the effort:-)
Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5Of particular interest to developers is the post on the query_post parameters.
The entry in the codex for query_post is currently empty and I’d thought it’d be useful to write up a quick post on the arguments that query_post uses as well as what you can do with them.
When I get a bit of time, I’ll transfer this info to the codex but in the mean time, enjoy:-)
(BTW, If anyone else is willing to put this info into the codex, then by all means, go ahead.)
Forum: Themes and Templates
In reply to: Howto: multiple loops in 1.5I’ve also written a set of posts on the same subject:
Query Posts and its various arguments
Multiple Loops
Using Query Posts to display only 1 pageForum: Themes and Templates
In reply to: Admin area styles/layoutsMacmanx, Joe Kohlmann’s admin interface has been developed as a plugin. Turning it on and off is via the plugin panel so it’s easy to revert back if it’s not your thing.
Forum: Fixing WordPress
In reply to: One post on frontpage – many on all other pagesGlad I could help:-)
Forum: Fixing WordPress
In reply to: Default Gravatar QuestionTry Skippy’s Gravatar plugin. Very useful.
Forum: Fixing WordPress
In reply to: One post on frontpage – many on all other pagesHave a look at this post:
Make WP show only one post on the front page