[SOLVED] display only sticky posts on homepage
Hi,
I'm using Montezuma on this site : http://fleury-arthelon.org/site/ And i want to display only the sticky posts on home.php. I've tried a lot of things like that : <?php if(!is_sticky() && (is_home() || is_front_page()) ) break; ?> in postformat.php but it doesn't work. Can anybody help me? Thanks a lot, Matt |
Do not double post! the other post has been removed.
|
I appologize for this mistake. I make a wrong manipulation...
|
when editing any of the virtual templates, in the top right you will see a tab 'Limited PHP Code'. That is the only PHP code that is allowed (due to WP restrictions that are too much to discuss here).
My suggestion would be to create a new page template and add in a dynamic widget area and then find a plugin that could be used to display only stickies. |
Ok, thanks.
I'm going to try |
I found !
I just insert <?php bfa_custom_query('cat=18'); ?> before <?php bfa_loop( 'postformat' ); ?> in my home.php which is a copy of index.php. I create a new category called "sticky". And it works ! Thanks, Matt |
One work-around would be to create a category called sticky or featured and assign that category to any posts which you want to be "sticky" (I would probably use featured so the category word looks better on the meta line for your visitors). Then you could use the bfa_custom_query() function to display just those posts. That's kind of the way the TwentyFourteen theme works, you assign a tag like featured to those posts that you want to show up in the Featured Posts grid on the blog page.
|
All times are GMT -6. The time now is 07:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.