Jump to content
Sign in to follow this  
dtraub

Recent Under Feature Boxes

Recommended Posts

dtraub

I created a new page template so that I could use the feature page, but put my most recent posts under the feature boxes before my footer. I found code in another thread to do this which I have pasted below. It looks just like I wanted it with one exception. At the bottom of the posts it shows the page navigation bar with a choice for "previous entries" If one clicks on it it goes to my 404 page. Instead of the navigation bar could I put a button or text or something that essentially says "Click here to read all postings" and have that redirect to my main blog page? Thanks, www.sellingbrilliantly.com ___________________________________________________________ Here is the code I used: <?php if(VPRO) { /* Template Name: Feature Page - Default */ get_header(); require(PRO.'/template_feature.php'); require(PRO.'/template_fboxes.php');?> <?php query_posts('showposts=3'); ?> <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(); } ?>

Share this post


Link to post
Share on other sites
dtraub

It also doesn't display the feature 2 or 3 ... just the first one.

Share this post


Link to post
Share on other sites
dtraub

I got the features working by using the feature page - default template and leaving the name as is. I had tried to make it a new template and changed the name. With that template it didn't work. The only difference in the code was the template name so not sure why. For the pagination, I tried playing with the parameters, but could not get it to stop display the navigation bar. I noticed in the _posts.php file the following line: <?php include(LIB.'/_pagination.php');?> I was thinking I could make it conditional so that it wasn't called from my home page. I've got two problems with making that work though... 1) my coding is weak and I don't know how to properly structure the if statement. 2) I've been playing with the widgetlogic plugin and it seems that I can not figure out any logic that will differentiate between the post section of my home/feature page and my blog page.

Share this post


Link to post
Share on other sites
cmunns

Why don't you just add this custom css under theme options to hide that "previous entries" bar on the home page `.page-id-4 .page-nav .wp-pagenavi {display:none;}` Hope that works :)

Share this post


Link to post
Share on other sites
dtraub

For some reason the tweak to show posts on the home page in addition to the blog page seems to have confused wordpress. It can not seem to distinguish between the home page and the blog page.

Share this post


Link to post
Share on other sites
dtraub

Probably not the most elegant way to do it, but I got it working... I put a function in the theme functions that returns the full current url. Then in the _posts.php file I check to see if the url is my home page and if it is skip the call to the pagination routine.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×