Over at the K2 forums, people are diligintly helping other people out. Its a great place to get answers about php coding for your wordpress site and the K2 theme. One of the members of the forum (steveo) wrote up the following code for a dynamic sticky using K2. Originally, I had written up a short tutorial on how to make certain posts ’sticky’, or stay at the top of your blog while other posts lined up behind. This allows you to feature some posts over others. The original code for Kubrick, the default theme for wordpress is here.
Steveo has gone and tweaked it up for K2. His original post is here, with the code pasted below:
[php]
< ?php if (is_home() && !is_paged()) { ?>
< ?php _e('Noteworthy','k2_domain'); ?>
-
< ?php $temp_query = $wp_query; query_posts("showposts=10&cat=11"); ?>
-
And here is how to stick it in a sidebar tab (see the sidebar tabs tutorial here):[php]
< ?php _e('Noteworthy','k2_domain'); ?>
-
< ?php $temp_query = $wp_query; query_posts("showposts=10&cat=11"); ?>
- back to menu
< ?php while (have_posts()) { the_post(); ?>[/php]
Thanks steveo for your contribution to the sticky post cause! You should visit his site, its pretty sweet.
< ?php while (have_posts()) { the_post(); ?>
27 Mar 06
12:13 pm
[...] This code has been updated for K2. Hot Dang!These icons link to social bookmarking sites where readers can share and discover new web pages. [...]