Jump to content
Sign in to follow this  
red3media

Can't get Pagination to Work in Custom Section

Recommended Posts

red3media

I made a custom section to display post results from specific categories and I can't get pagelines_pagination(); to work right. My code.

	<?php
	/*
		Section: PostLoopCC
		Author: Andris
		Author URI: http://www.pagelines.com
		Description: Credit Cards Section
		Class Name: CreditCards2
		Workswith: main
	*/
	
	class CreditCards2 extends PageLinesSection {
	
	   function section_template() {
	
	
	
			$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
			query_posts("category_name=Feed");
			while (have_posts() ) : the_post();
	
			$custom_fields = get_post_custom();
	 		$activationfield = $custom_fields['Activation_Fee'];
	 		$annualfeefield = $custom_fields['Annual_Fee'];
	
	
	?>
	
	My custom layout is here
	
	<?php
	
		endwhile;
	
	
	
			   function section_template() {
			pagelines_pagination();
		}
	
		}
	
	
	
	}
	
	/*
		End of section class
	*/
	
	

Share this post


Link to post
Share on other sites
red3media
Never mind.... I finally fixed it. query_posts("category_name=Feed&paged=$paged");

Share this post


Link to post
Share on other sites
Rob
Great! It's always best when people find their own solutions!

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
red3media
Can someone change the CSS for the code in these posts? The font is huge. Anyone else agree?

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  

×