Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Custom templates and sticky posts


  #1  
Old Jun 1, 2012, 02:27 AM
Mesjps
 
1 posts · Jun 2012
Custom templates and sticky posts

I'm trying to create som custom templates for a website, my problem are sticky posts.

I want to show posts from category "A" on page "A", posts from category "B" on pages "B" and so on, with the use of excerpts, thumbnails and kickers that Atahualpa provides.
I have tried to put some different code in my templates, this could be one of them:
<?php /* Get all sticky posts */
$sticky = get_option( 'sticky_posts' );
/* Sort the stickies with the newest ones at the top */
rsort( $sticky );
/* Get the 2 newest stickies (change 2 for a different number) */
$sticky = array_slice( $sticky, 0, 2 );
/* Query sticky posts */
query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) );?>

But no matter which code snip I'm using and where in the template file I put it, the sticky post are not showing up at the top of the post-page.

Some help would be much appreciated.

Bookmarks

Tags
custom templates, sticky posts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Post Templates Revisited waded1 Atahualpa 3 Wordpress theme 12 Apr 7, 2012 11:15 AM
Auto-install borked custom templates - but I should have known better... rickheck New Versions, & Updating 3 Dec 15, 2011 03:37 PM
[SOLVED] How to Remove the Icon Sticky.gif in Sticky Posts lexsisney Center area post/pages 1 Apr 16, 2010 01:27 PM
[SOLVED] Posts marked sticky don't show up with sticky formatting genevieve Atahualpa 3 Wordpress theme 12 Jun 30, 2009 08:06 AM


All times are GMT -6. The time now is 03:13 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.