asknight
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Theme’s graphics not workingI believe there is a problem in the supplied .htaccess mod-rewrite code that allows an image request to be redirected to the index.php instead of simply passing it along.
Forum: Fixing WordPress
In reply to: get_posts loop outside ‘the loop’ don’t see post objectsNooooo, the function is being called however many times in the foreach loop. I’d expect both $post and $extraposts to be happening.
Forum: Fixing WordPress
In reply to: get_posts loop outside ‘the loop’ don’t see post objectsb.t.w. forgot to mention:
global $post, $extraposts;
should have been included in the example above.Forum: Fixing WordPress
In reply to: Pages display nothingI know this to likely be a wordpress supressed SQL error – was just searching to find if I can unsupress them from the template.
Forum: Fixing WordPress
In reply to: duplicated #!#!/usr/local/bin/php (php path)If it was me, and it once was, I’d go to a hosting provider that doesn’t require you to use cgi php.
Forum: Fixing WordPress
In reply to: index.php – single category hack?Forum: Fixing WordPress
In reply to: Show one category on index.phpOk, one thing you may be running in to is that wp-blog-header.php (see top of your index.php), when it sees a set $cat=#, makes the assumption that you also want all the children of the specified category too (if they exist of course), even if you don’t. This was my case, so I did the following:
First, I wanted the index.php page to always insept with a certain set of posts so I ended up with this line after at the very beginning of index.php::if (! isset($_GET[cat])) {$cat=6; $numberposts=9; $orderby="category"; $order="ASC"; $fetchkids=0;}
Next, the following code changes were made to wordpres/wp-blog-header.php
An aside thing to know is that 1.2.1 at least ‘allows’ only orderby= on'author','date','category','title'
I also added a consumable variable called ‘fetchkids’ at the end of $wpvarstoreset array at line 51. Then at line 264 the code changes to:
if (! isset($fetchkids) || $fetchkids) {
$whichcat .= get_category_children($cat_array[0], ' '.$andor.' category_id '.$eq.' ');
for ($i = 1; $i < (count($cat_array)); $i = $i + 1) {
$whichcat .= ' '.$andor.' category_id '.$eq.' '.intval($cat_array[$i]);
$whichcat .= get_category_children($cat_array[$i], ' '.$andor.' category_id '.$eq.' ');
}
}
So, by setting $fetchkids to FALSE (0) above, and adding the code, I effectively broke out of the bit that would end up fetching all the children posts of my parent category.
Yes, it’s a hack but no less elegant than the convention I see in place w/in wordpress/wp-blog-header.php;Forum: Fixing WordPress
In reply to: centering imageshere’s what I do:
<div style="margin:auto; width:90%(or 432px, etc - should be at least as wide as the image it contains); text-align:center; border:1px dotted blue"> <img src="/images/groovyimage.png " alt="don't forget the alt" /></div>
Forum: Plugins
In reply to: wp javascript scroller in progressthe javascript developer also has a multiple message ‘belt’
https://www.geocities.com/vbarsan/
Which probably can be plugged in and used the same way.
In the script, you’ll find markup for the fast/slow bit. Simply delete the lines to omitt the feature.
BTW, the plugin is finished. if there’s enough interest, I’ll pack up the 4/5 files and make them available.Forum: Fixing WordPress
In reply to: cannot logout of WPto above, turns out the actual logout didn’t happen.