Jump to content


Photo
- - - - -

Can you add posts below feature page box?


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1 timandrew

timandrew

    Member

  • Members
  • PipPip
  • 11 posts

Posted 03 December 2009 - 10:04 AM

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

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 03 December 2009 - 07:59 PM

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:
``

in `index.php`

#3 timandrew

timandrew

    Member

  • Members
  • PipPip
  • 11 posts

Posted 06 December 2009 - 10:39 PM

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.

#4 timandrew

timandrew

    Member

  • Members
  • PipPip
  • 11 posts

Posted 13 January 2010 - 08:43 PM

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

#5 josiahdthompson

josiahdthompson

    Member

  • Members
  • PipPip
  • 17 posts

Posted 20 January 2010 - 05:10 PM

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

#6 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 21 January 2010 - 12:22 AM

@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.

#7 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 21 January 2010 - 12:37 AM

@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.

#8 josiahdthompson

josiahdthompson

    Member

  • Members
  • PipPip
  • 17 posts

Posted 21 January 2010 - 04:32 AM

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?

#9 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 21 January 2010 - 09:17 AM

@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".

#10 josiahdthompson

josiahdthompson

    Member

  • Members
  • PipPip
  • 17 posts

Posted 21 January 2010 - 03:57 PM

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

#11 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 22 January 2010 - 05:11 AM

@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.

#12 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 22 January 2010 - 05:19 AM

@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.