Python Script to Import Simple Tagging tags to Wordpress 2.3
Database: dbname Database user: dbuser dbuser Password: Wordpress table prefix [wp]: wp 215 tags imported.
Tags: WordPress, Python, tagging
Database: dbname Database user: dbuser dbuser Password: Wordpress table prefix [wp]: wp 215 tags imported.
Tags: WordPress, Python, tagging
function wp_cache_ob_callback($buffer) {
..
/* we avoid caching incomplete files */
if (is_404() || !preg_match('/(<\/html>|<\/rss>|<\/feed>)/i',$buffer) ) {
$new_cache = false;
return $buffer;
}
// dun cache password protect post <-- add here
global $post;
if (is_single() && !empty($post->post_password)) {
$new_cache = false;
return $buffer;
}
Tags: WordPress
Posted in WordPress
Categories: Diversion, Game, Science, Sports, Technology, World, Php and Python. Tags: Astronomy, environment, nba, php, python, Microsoft and videoArchives: June, July, August, September, October, November, December. January, February, March, April, May.
Tags: WordPress, Python, Digg, Php
Posted in Php , WordPress , Python
if ( empty($title) ) {
$tag = get_query_var('tag'); // assume
if ( !empty($tag) )
$title = "Browse by ".$tag;
}
Posted in WordPress
function get_tags($tag) {
return explode("+", $tag);
}
function navigate_tags($tag) {
$tags = get_tags($tag);
$tagUri = '/tag/';
$link = '';
$tagfmt = '>> <a href="%link%">%name%</a> ';
$tagvars = array("%link%", "%name%");
$nav = '';
foreach ($tags as $t) {
$link .= (($link != '')? '+' : '') . $t;
$nav .= str_replace($tagvars, array($tagUri.$link, $t), $tagfmt);
}
return $nav;
}
$defaults = array('type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC',
'hide_empty' => true, 'include_last_update_time' => false, 'hierarchical' => 1, 'exclude' => '',
'include' => '', 'number' => '', 'pad_counts' => false, 'show_top' => false);
if ($show_top)
$where .= ' AND category_parent = 0';
<?php wp_list_cats('sort_column=name&hierarchical=0&show_top=true') ?>