thebindlestick
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WYSIWYG editor losing HTML on 2.1My work around for <br> tags that don’t work is:
<p> </p>seems to add a line break in most browsers.
Forum: Fixing WordPress
In reply to: query_posts in sidebarThe solution I ended up with after two days of banging my head into my monitor is that The Lop in my index and The Loop in my sidebar were interfering with eachother. I found this solution and it is the only thing I can get to work; see first and last lines of code specifically:
<?php $temp_query = $wp_query; ?>
<?php query_posts(‘cat=-5’); ?><?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
— do stuff —
<?php endwhile; ?>
<?php endif; ?>
<?php $wp_query = $temp_query; ?>Can anyone see why this is a bad idea in WP 2.1?
Forum: Fixing WordPress
In reply to: SELECT only certain categoriesHow about this:
<?php query_posts('cat=-5'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="rss" id="post-<?php the_ID(); ?>"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1> </div> <?php endwhile; ?> <?php endif; ?>That displays the correct list of posts in my sidebar but they all link to the post displayed on the main page, it is like the to query_posts interfere with eachother, is this the case?
Forum: Fixing WordPress
In reply to: SELECT only certain categoriesOn that page it says:
” Excluding Multiple Categories
Note: You cannot exclude more than one category with query_posts. Therefore you can use workarounds or plugins.”
Those work arounds are what I am looking for. I have tried conditional loops and they do not work. I am not looking for an if_home function, this is for my sidebar, to only display titles, not the entire post.
Forum: Plugins
In reply to: How to exclude categories from loop?He has a 2.1 version, anyone using this? is there a way to hack this to exclude categories from the list on another page, i.e. right.php instead of sidebar.php?
Forum: Fixing WordPress
In reply to: SELECT only certain categoriesQuery_posts doesn’t have an exclusion option, AFAIK.
Forum: Fixing WordPress
In reply to: Static Information in sidebarEither use pages (admin panel, manage pages) or go to /wp-content/themes/your-theme/sidebar.php and edit that file in the theme editor (presentation / theme editor)
Forum: Fixing WordPress
In reply to: SELECT only certain categoriesI know how to do the opposite like this:
$myposts = get_posts(‘numberposts=10&offset=1&category=5’);
and display one category, but how do I display all BUT one?
$myposts = get_posts(‘numberposts=10&offset=1&category!=5’);
doesn;t work with the (!) in there.
Forum: Fixing WordPress
In reply to: Removing catagory and archive headingsLook in your Theme folder (wp-content/themes/your_theme_folder) and look in the index.php folder… somewhere after <?php if (have_posts()) : ?> there should be a category display…
first though back up your index file to a separate folder in case ya mess it up.
Forum: Fixing WordPress
In reply to: query_posts in sidebaranyone?
Forum: Fixing WordPress
In reply to: Number of Posts hackThat don’t work for 2.1, plus I was looking for a simple non-plugin hack for it. I found it:
<?php
if (is_home()) {
query_posts(“showposts=1”);
}
?>Forum: Themes and Templates
In reply to: posts from just one category on front pageanything like that available for 2.1?
Forum: Installing WordPress
In reply to: Recent Posts – Title LengthSorry for my delayed response, it’s been too nice outside here in Seattle to stay online! Here is what I am using:
<?php foreach ($recentposts as $post) { if ($post->post_title == '') $post->post_title = sprintf(__('Post #%s'), $post->ID); echo "<li><a href='".get_permalink($post->ID)."'>"; the_title(); echo '</a></li>'; } ?>I’d like to limit the number of words that are displayed in the title, in the sidebar only, but not on the post’s page itself – limit it to what will fit on one line… not just truncate it to a certain character count; that’s easy.
Like I said in my first post, if I have six words in the title but only four fit on a line before it is wrapped to the next line, I’d like it to stop after the fourth word and ad an ellipse (…) so if it is set to 31 characters maximum, it would change:
WordPress Issues World Wide Press Release
to
WordPress Issues World Wide…
but not just like 31 characters like this:
WordPress Issues World Wide Pre
So it finds 31 characters, then goes back to the end of the last word, and stops there and adds an ellipse, any ideas?
Forum: Fixing WordPress
In reply to: WordPress killing Sessions?Same here. My site goes from the WordPress index to a custom shopping cart, and the session ID is started on the first page of cart, but for some reason it isn’t working. It kicks me back to the index when the if statement in the session check fails.
Forum: Fixing WordPress
In reply to: resetting database connection back to WP dbwhat is the new_link supposed to be, the table name?