Archived

This topic is now archived and is closed to further replies.

Can you add posts below feature page box?

12 posts in this topic

Posted · Report post

My ideal set up is to have the feature page box as my home page but with the regular blog posts below. This is so the important posts can remain visible and accessible for long after the unimportant posts have dropped off the bottom of the page. Having the feature page as my home page feels too static. Having the posts as my main page means the content I've spent ages creating gets bumped off the way before I want by little news items. Hope this hasn't been asked before as a search doesn't find anything. current site using iBP2: www.yellowwheels.com Thanks

Share this post


Link to post
Share on other sites

Posted · Report post

This is so the important posts can remain visible and accessible for long after the unimportant posts have dropped off the bottom of the page.
Have you tried making posts 'sticky'? You could try calling this function: `<?php require(PRO.'/template_feature.php');?>` in `index.php`

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks that works (just correct the typo though)

<?php require(PRO.'/template_feature.php');?>
That should Be <?php require(PRO.'/template-feature.php');?> Also found you have to remove <?php get_footer(); ?> from the template-feature.php page, otherwise the footer gets shown before the posts.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi I've been struggling a bit with this mod. The feature block is nicely slotted into my homepage with posts below, but the feature 1,2,3 buttons don't show, nor do they cycle through despite being enabled. Also widgets I've added to the sidebar don't appear. Any ideas? test website using IBP3.5.5 http://more.yellowwheels.com

	?>
	<?php get_header(); ?>
	
	<div id="left-col">
	
		<div id="content">
	<?php require(PRO.'/template_feature.php');?>
		 <?php require(LIB.'/_posts.php');?>
	
		</div> <!-- end content -->
	</div> <!-- end left col -->
	
	<?php get_sidebar(); ?>
	<?php get_footer(); ?>
	

there's a live site using IBP2 at http://www.yellowwheels.com

Share this post


Link to post
Share on other sites

Posted · Report post

I have a similar problem. I would like to have the feature box at the top of my home page with dynamic posts below it. I edited the index php file but nothing changed. also under settings > reading I changed the page to dynamic and it took away the feature box. It seems like I only get one or the other. what can I do? and for some reason the main page has all of the content of my other pages below the feature box. what a mess. haha oh yea im using the whitehousepro template website creditprotectionalliance.com

Share this post


Link to post
Share on other sites

Posted · Report post

@timandrew Hm, the problem is that the header.php file isn't calling the files needed for the feature section as it doesn't know that you're adding the feature section to the index page. I would suggest modifying one of your three different page-feature templates. Let's say you were to modify page-feature-stdpage.php, modify the code to look like so:

<?php
	if(VPRO) {
	/*
		Template Name: Feature Page - Page Content
	*/
		get_header();
			require(PRO.'/template_feature.php');
	                <div id="left-col">
		             <div id="content">
			           <?php require(LIB.'/_posts.php');?>
	                     </div> <!-- end content -->
	                </div> <!-- end left col -->
	
	        get_sidebar();
		get_footer();
	}
	?>
	

Now when you create a page and set it to the 'Feature Page - Page Content' page template, you should get posts showing up underneath your feature box. Let me know if that works for you.

Share this post


Link to post
Share on other sites

Posted · Report post

@josiah.d.thompson It's a bit more simple for you. You can modify the page-feature-page.php template. In page-feature-pge.php, replace:

require(LIB.'/template_page.php');
with:
require(LIB.'/template_posts.php');

Now when you create a page and set the template to "Feature Page - Page Content" you should see the feature block at the top, and posts below it.

Share this post


Link to post
Share on other sites

Posted · Report post

thank you for your quick response It didn't work I edited the pg-feature-pg.php like this:

<?php
	if(VPRO) {
	/*
		Template Name: Feature Page - Page Content
	*/
	
		get_header();
			require(PRO.'/template_feature.php');
			require(LIB.'/_sub_head.php');
			require(LIB.'/template_posts.php');
		get_footer();
	}
	?>

any suggestions?

Share this post


Link to post
Share on other sites

Posted · Report post

@josiah.d.thompson do you mind sending a live link? What was wrong with the page? Try creating a new page and setting the page template to "Feature Page - Page Content". When you go to that new page, it should appear as so. Make sure NOT to set that page to the "posts page" in "Settings >> Reading".

Share this post


Link to post
Share on other sites

Posted · Report post

ok here is the link creditprotectionalliance.com In the reading settings I have it set so that: Front page displays:static page front page: home I created a home page and set that as the front page I tried just deleting a home page altogether but then I cant activated the feature page template because the front page automatically switches to dynamic posts. I also tried creating the homepage with the feature template but not setting it as the front page. it just added another "home" pg to my menu bar. I deleted and recreated the homepage as the correct template. right now you should see the feature box with the page set to static content. Just so you know what Im looking for, I want the front page exactly like it appears but the content area(it says "home" and "test") I would like to be dynamic with all of the posts up there. thank you so much for your help Josiah

Share this post


Link to post
Share on other sites

Posted · Report post

@josiah.d.thompson my fault! let's step backward. arpowers was right in that was should modify the 'index.php' file. Add the bolded text in the "index.php" file like this:

get_header();
		require(LIB.'/_sub_head.php');
		[b]require(PRO.'/template_feature.php');[/b]
		require(LIB.'/template_posts.php');
		get_footer();
And make this edit in the "header.php" file:
<?php if((is_page_template('page-feature.php') || is_page_template('page-feature-page.php')[b] || is_home()[/b]) && VPRO) require (PRO.'/init_feature.php');?>

Now the front page, if set to dynamic posts, should show features at the top and posts below it. Let me know if that gets you what you need.

Share this post


Link to post
Share on other sites

Posted · Report post

@timandrew Here we go. Disregard the above. The header.php file should look like so (the bold is the edit).

<?php get_header();
	[b]require(PRO.'/template_feature.php');?>[/b]
	<div id="left-col">
		<div id="content">
		 <?php require(LIB.'/_posts.php');?>
		</div> <!-- end content -->
	</div> <!-- end left col -->
	<?php get_sidebar(); ?>
	<?php get_footer(); ?>
In the header.php file make this edit (shown in bold):
<?php if(is_page_template('page-feature.php') || is_page_template('page-feature-stdpage.php') || is_page_template('page-feature-full.php') [b]|| is_home()[/b]):?><script type="text/javascript" src="<?php echo JS_FOLDER;?>/jquery.cycle.all.js"></script><?php endif;?>
. and this edit:
<?php if((is_page_template('page-feature.php') || is_page_template('page-feature-stdpage.php') || is_page_template('page-feature-full.php') [b]|| is_home()[/b]) && VPRO) require (PRO.'/init_feature.php');?>

Now your dynamic post page should show features on top.

Share this post


Link to post
Share on other sites