Len
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Support Forum? What Support?In my view WordPress is useless unless there is a system of support that works. Yes, I know they are all volunteers but it has not worked for me, and lot’s of other people if the number of unresolved problems is anything to go by.
The support surrounding this software is community-driven ie: you and me. Of the thousands of WordPress users out there only about a dozen or so help out in this forum answering questions on a regular basis. Do you see the volume of support tickets coming in on a daily basis? You do the math.
Full content (with read more link if enabled) –>
<?php the_content('Read more »'); ?>Excerpt –>
<?php the_excerpt() ?>What theme are you using?
Forum: Fixing WordPress
In reply to: How to make an excerpt longer?Actually another way to create custom length excerpts is to insert this in your theme’s function.php file…
remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'custom_trim_excerpt'); function custom_trim_excerpt($text) { // Fakes an excerpt if needed global $post; if ( '' == $text ) { $text = get_the_content(''); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); $excerpt_length = x; $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words); array_push($words, '...'); $text = implode(' ', $words); } } return $text; }Adjust the x in
$excerpt_length = x;to whatever you want.With respect to images if you’re using excerpts on the front page you could use Custom Fields and place this in index.php right after the loop,
<img src="<?php echo get_option('home'); ?>/wp-content/themes/YOUR-THEME/images/YOUR-IMAGE.png" width="50px" height="50px" alt="" />If you do this you’ll have to play around with the style sheet to get it to look right.
If you’re using excerpts elsewhere images won’t work. WordPress strips out all formatting on non-index.php/home.php post pages.
Forum: Fixing WordPress
In reply to: How to make an excerpt longer?I believe the file you need to edit is located at wp-includes/formatting.php
Look for
excerpt_lengthThe default is 55. However, rather than altering core files (which isn’t a good idea) you may want to use a plugin. Perhaps there is something in this list you can use,http://wordpress.org/extend/plugins/search.php?q=excerpt
Also, you do know that you can include your own “optional excerpts” right? Under the write post window there is a box for that purpose.
Forum: Fixing WordPress
In reply to: Display comment excerpt rather than titleThe FYI says compatible up to WP 2.3 but I’m using it on WP 2.7 with no problems.
Forum: Fixing WordPress
In reply to: Show All Recent postsBasically what you need to do is create a new Page template then assign your new page to use that template. Once you have uploaded your new template file to your theme’s folder, simply write a new page – for the sake of simplicity let’s call it Latest Entries – then assign the new page template to that page from the drop menu.
You can easily build a new page template by using your theme’s current page.php as an example.
Leave the actual content of the page blank. Publish the new page. It will be blank but that’s fine. In the new template file – once again for simplicity let’s call it latest.php – you can use this modified version of the loop …
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("showposts=x&paged=$page"); while ( have_posts() ) : the_post() ?>I used the
showposts=argument so that you can show as many posts on that page as you want despite your settings in the admin interface – this will override it. Be sure to enter the number of posts you want shown in place of the x.If you’re not sure how to implement what I have shown you I have included a complete new page template to a pastebin service. All you need to do is download it then upload it to your theme’s folder.
A caveat: I see your using Arthemia Pro. I used the free version of Arthemia as a working example but I doubt there is any difference in how its page templates are constructed.
Forum: Themes and Templates
In reply to: featured and latest articles are the sameWe can accomplish this by using the
query_postsfunction. In that particular theme scroll down and find the Loop. It will look like,<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>Immediately before that add the
query_postsfunction …<?php query_posts('showposts=5&offset=1'); ?>offset=1will display posts after the most recent one whileshowposts=I think is obvious.More reading on query_posts.
Forum: Plugins
In reply to: anyone know of a dirty word filter for comments?Haven’t tried it so can’t vouch for it.
Forum: Themes and Templates
In reply to: Can I remove the sidebar this way?See any long term issues with that?
Nah. You can use all the stylesheets you want. They aren’t actually downloaded on a visitor’s browser until needed so it won’t affect load time.
Forum: Fixing WordPress
In reply to: Only Show a Post Summary on Category PageI had a look at your theme and fortunately it has its own archive.php so the fix is simple. Go to archive.php and look for this tag…
<?php the_content() ?>…and change it to…
<?php the_excerpt() ?>This will make archive.php (which is the template your categories use) show excerpts rather than the full content. Once you do this, if you really want to get fancy, when writing a new post (or editing an existing one) use the “Excerpt” box under the write post window. You can insert anything you want in there and it will show rather than the standard excerpt.
Forum: Themes and Templates
In reply to: Can I remove the sidebar this way?Your approach is correct but of course now you have this ugly empty space where the sidebar used to be. 🙂 That’s easy to fix. You simply have to adjust your stylesheet. Look at the default Kubrick theme to see how it accomplishes this. Notice the content DIV on index.php and single.php uses different classes?
<div id="content" class="narrowcolumn"><div id="content" class="widecolumn">Study the differences between these 2 in the stylesheet. It’s not that hard to wrap your head around it.
Forum: Fixing WordPress
In reply to: Newbie Question – Reader PostsIf registration is enabled on your site then navigate to Settings > General and scroll down to “New User Default Role” where you will see a drop menu. Before doing that you may want to read through this,
Forum: Fixing WordPress
In reply to: my post are posting backwards on my home page?There’s a bug in mySQL version 5.0.51 and possibly others that can cause this especially when using themes that make use of queries. More info in this thread,
Forum: Requests and Feedback
In reply to: WordPress 2.7 Upgrade suggestionMaybe I was wrong, but I though wordpress 2.7 was being released along with wordpress.com ?
WordPress.com was supposed to have been upgraded this evening (I haven’t checked) but self-hosted blogs will have to wait a little as 2.7 is still being put through some rigorous testing. One of the features currently being tested is the theme auto-upgrade.
http://comox.textdrive.com/pipermail/wp-testers/2008-December/010500.html
Forum: Installing WordPress
In reply to: How can i upgrade from 2.1.3?You won’t like this answer but since you haven’t upgraded in a long time you’ll want to do an incremental upgrade. Concise instructions in this thread,