Raikage and Tsunade - WP Tips

Like we all know, WordPress is powerful publishing platform. Now everywhere is WordPress, blogs, portal, e-commerce and many more running on WordPress. WordPress is amazing and multi user. Now we will show you how to redirect user into random post in WordPress.

Raikage and Tsunade - WP Tips

Raikage and Tsunade - WP Tips

We only needed tiny script that we need to put on functions.php. Mostly on newest wordpress theme already have functions.php on the theme folder. So open that file and added this code

add_action('init','random_add_rewrite');
function random_add_rewrite() {
       global $wp;
       $wp->add_query_var('random');
       add_rewrite_rule('random/?$', 'index.php?random=1', 'top');
}

add_action('template_redirect','random_template');
function random_template() {
       if (get_query_var('random') == 1) {
               $posts = get_posts('post_type=post&orderby=rand&numberposts=1');
               foreach($posts as $post) {
                       $link = get_permalink($post);
               }
               wp_redirect($link,307);
               exit;
       }
}

Read more

We still test some bugs that currently happen on WPTricks.net we hope our tiny bugs will be fixed soon so we can update our site regularly again. Thanks for your patience and keep practicing and do something good

Use this tiny hack to Highlight search-result on WordPress. Open search.php and Replace the_exerpt() with:

echo $excerpt;

And then add the following just before the edited line:

$excerpt = get_the_excerpt();
$keys = explode(" ",$s);
$excerpt = preg_replace('/('.implode('|', $keys) .')/iu', '<strong class="search-excerpt">\0</strong>', $excerpt);

Now the last step is add .search-excerpt class your style.css and do whatever style you really like it. That’s it.

After big success on New WordPress 3.2 released, WordPress team has been updated into WordPress 3.2.1, this update coming after some problem on many hosting company on JavaScript Modul JSon.

You can download WordPress 3.2.1 on WordPress.org for free. Or you can using automatic method via WordPress Dashboard. For me WordPress 3.2 much cleaner dashboard and more easier to explore. Well done

bbPress New Feature
bbPress New Feature

bbPress New Feature

Have you download bbPress 2.0 Beta 2? Maybe bbPress not so popular such WordPress, but bbPress is another project by WordPress.org. This project for bbPress is created simple but powerful forum for WordPress community.

 

Using bbPress we can integrated with our WordPress easily. We can integrate using plugin or directly add it. Read more

Page 1 of 3412345102030...Last »