This photo taken near Tembeling Resort at Kuantan, Pahang.
Archives for January 2010
Seperate Post To Different Pages By Category
Isnt it cool if my blog can seperates all the post into different category and put in their particular pages?
Why i need this? Because i have two interest, Web Development and Photography.
Now i have seperates this blog to two pages, Photo Blog & ICT Blog. Then we can talk more! Hahah!
Add this in function.php
function child_theme_photo_blog() {
if (is_page('Photo Blog')) { // change '48' to the id # of your page
$limit = get_option('posts_per_page');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
//change '4' to you category id # and change the value of $limit to the # of posts you want displayed per page
query_posts('category_name=Photography' . '&showposts=' . $limit=5 . '&paged=' . $paged );
//$wp_query->is_archive = true; $wp_query->is_home = false;
}
}
add_action('thematic_above_indexloop', 'child_theme_photo_blog');
Add this to custom pages e.g
Change WordPress Theme Trough Database
To view current setup, neet to run this
SELECT *
FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';
To change to default or other setup run this on sql
UPDATE wp_options SET option_value = 'default' WHERE option_name = 'template';
UPDATE wp_options SET option_value = ‘default’ WHERE option_name = ‘stylesheet’;
UPDATE wp_options SET option_value = ‘default’ WHERE option_name = ‘current_theme’;