August 25th, 2008 Mark
By default WordPress MU does not allow embed code even when using the HTML post feature. This is different from singe WordPress instances that do allow embedding.
The fix: Edit wp-include/kses.php. In that file search for “Post filtering” and then comment out the following lines:
// Post filtering
//add_filter(’content_save_pre’, ‘wp_filter_post_kses’);
Please note this will affect all blog instances within the WordPress MU installation.
This fix came from Simply-Basic.com ????? ???? ??????
Posted in Code, Wordpress, Wordpress MU | 1 Comment »
August 22nd, 2008 Mark
So there’s a bug in the wordpress query_posts() function with Pagination when you’re building a custom template and you want to view posts by category and have it limit a page to a certain numbers of posts. Most of the solutions in the WP forums are bogus. You get the page links but the pages are the same posts. As i suspected you gotta tweak the query and this guy has the perfect solution here. ??????? ?????
Posted in Code, Templating, Wordpress | 3 Comments »
August 7th, 2008 Mark
Saw a lot of possible fixes for this issue. The problem is in the General Settings of Podpress, when enabling Podtrac statistics nothing changes with the MP3 urls in the feed. All you have to do is format your uploads folder field named “URI of media files directory” like this:
http://www.podtrac.com/pts/redirect.mp3/www.YOURDOMAINNAME.com/wp-content/uploads
This is assuming you already have an account set up wih Podtrac.
Posted in Podpress, Wordpress | No Comments »
May 2nd, 2008 Mark
Was trying to figure out the proper way to sort my WP_Query post results by category and found out that there are some buggy things with the sortby using WP_Query. I wanted to sort by cat_name then tried cat_id and cat_nicename. All work for the most part but would throw a post randomly out of order. So I ended up stacking my results into an object array and using the trusty PHP “sort”. Like this:
class an_object {
var $an_name;
var $an_slug;
}
$i=0;
$my_query = new WP_Query();
while ($my_query->have_posts()) : $my_query->the_post();
$an[$i] = new an_object();
foreach((get_the_category()) as $category) {
$an[$i]->an_slug = $category->category_nicename;
$an[$i]->an_name = $category->cat_name;
}
$i++;
endwhile;
sort($an);
$z=0;
while($an[$z]){
echo $an[$z]->an_name.” “.$an[$z]->an_slug.”<br />”;
$z++;
}
Posted in PHP, Wordpress | No Comments »