Jump to content
Sign in to follow this  
dugoni

Still trying to make a customized archive page...

Recommended Posts

dugoni

And I'm still not sure where I'd put my custom code in section.php. I got as far as creating the custom page template and the custom section.php files, and modifying the custom section.php file so it's pulling only posts from the parent category I want. But how do I do additional customizations? I want to loop through the child categories and format and display them in a particular way. Here's what I have so far: class PageLinesPostLoopIssues extends PageLinesSection { function section_template() { //Included in theme root for easy editing. echo "This is the PageLinesPostLoopIssues section"; query_posts("cat=5"); $theposts = new PageLinesPosts(); $theposts->load_loop(); } } Here's my question and code from the previous version of my site before the upgrade to Pagelines 2.0: http://www.pagelines.com/forum/discussion/16129/how-do-i-recreate-my-custom-archive-page-in-pagelines-2.0#Item_4 and here's what it's supposed to look like - again, this is from the previous version of the Pagelines software. http://www.contactpoint.womeninit.net/category/issues/ Thank you!

Share this post


Link to post
Share on other sites
dugoni
Sure, the current page looks like this. http://contactpointpacific.dreamhosters.com/backissue/

Share this post


Link to post
Share on other sites
dugoni
Oh, and I just saw your response on a different thread: http://www.pagelines.com/forum/discussion/15945/the-loop-in-pagelines-framework/p1 "The posts are handled in class.posts.php." So can I copy class.posts.php over to my child theme and modify it there?

Share this post


Link to post
Share on other sites
kastelic
I hope i'm not sending you on a different track here, but does it work if you do this? [code]function section_template() { //Included in theme root for easy editing. echo "This is the PageLinesPostLoopIssues section"; query_posts("cat=5"); while ( have_posts() ) : the_post(); echo '
  • '; the_title(); echo '
  • '; endwhile; wp_reset_query(); } }[/code]

    Share this post


    Link to post
    Share on other sites
    dugoni
    Why, yes it does! :-D So does that mean I can reuse some of my code from before? I'm particularly concerned about being able to loop through the subcategories...

    Share this post


    Link to post
    Share on other sites
    kastelic
    Yes I don't see a reason why not. The loop in that example is just wordpress code. I'm not sure what you mean by looping through subcategories, what is the outline of how this is all going to appear? You can modify your query in many different ways to achieve what you want.

    Share this post


    Link to post
    Share on other sites
    dugoni
    This is an archives page for our alumni magazine, listing the stories by what issue they appeared in. I got it working with the earlier version of PageLines at http://www.contactpoint.womeninit.net/category/issues/. The code I used to do it is listed at: http://www.pagelines.com/forum/discussion/16129/how-do-i-recreate-my-custom-archive-page-in-pagelines-2.0#Item_4 I'm still not sure how I'm supposed to modify what I'd done before so it will work here. When I tried pasting it in, I got errors...

    Share this post


    Link to post
    Share on other sites
    dugoni
    OK, it turned out my error was caused by a reference to a plugin. That problem is now resolved, and with a few minor modifications, I am able to reuse my code from before. Yay! Thank you all!

    Share this post


    Link to post
    Share on other sites
    gary@garysargent.com
    What if you wanted to call all the parts of of the most recent blog excerpt? Blog Image Title Metabar Excerpt Continue Reading link

    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  

    ×