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 » Montezuma Theme »

[SOLVED] display only sticky posts on homepage


  #1  
Old Mar 9, 2015, 10:08 AM
matthieugu
 
4 posts · Mar 2015
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

Last edited by lmilesw; Mar 10, 2015 at 08:02 AM.
  #2  
Old Mar 9, 2015, 01:10 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Do not double post! the other post has been removed.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 10, 2015, 03:43 AM
matthieugu
 
4 posts · Mar 2015
I appologize for this mistake. I make a wrong manipulation...
  #4  
Old Mar 10, 2015, 07:42 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Mar 10, 2015 at 07:54 AM.
  #5  
Old Mar 10, 2015, 09:30 AM
matthieugu
 
4 posts · Mar 2015
Ok, thanks.

I'm going to try
  #6  
Old Mar 10, 2015, 10:04 AM
matthieugu
 
4 posts · Mar 2015
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
  #7  
Old Mar 10, 2015, 11:03 AM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
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.
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!

Last edited by CrouchingBruin; Mar 10, 2015 at 01:15 PM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting static homepage to display posts thynne.j1 Montezuma Theme 2 Jun 26, 2013 01:04 AM
Cannot display full posts on homepage and can't change excerpts length ute Excerpts, Read more, Pagination 7 Apr 26, 2011 03:41 PM
PHP code to display posts from certain categories on homepage sradhey Center area post/pages 1 Apr 1, 2011 03:48 PM
How do I display posts excerpts from specific categories on the homepage? aeerol Center area post/pages 0 Jun 12, 2010 04:32 PM
Display the posts within a catagory as my Homepage bloggersmarket Page & Category Menu Bars 1 Apr 15, 2010 06:46 AM


All times are GMT -6. The time now is 09:47 PM.


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