Jump to content


Photo
- - - - -
Open

Custom Post Loop Content using the default template



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

#1 zouleo

zouleo

    Super Member

  • Members
  • 165 posts

Posted 19 October 2012 - 05:39 AM

Basically I have a sql query that selects about 50 posts from the database based on certain criteria. What I'm wonder is if it is possible to display all these posts on a page using the default template for post the post loop.

What I have done so far is to make a plugin that inserts the list in any post based on a shortcode [myspecialposts]. And then I do a sql query to fetch the posts. But how do I display each post using the default themplate?

This is my code:

Please Login or Register to see this Hidden Content


Basically I want to use the get_article() function in the PageLinesPosts class. Is that possible?

Please help.

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17600 posts

Posted 19 October 2012 - 08:53 AM

HI,

I think the best course of action would be to create a custom loop section based on the Postloop section and add your criteria to the code.

#3 zouleo

zouleo

    Super Member

  • Members
  • 165 posts

Posted 21 October 2012 - 06:27 AM

Thanks for the suggestion. But the postloop section is almost empty:


Please Login or Register to see this Hidden Content


Would it be possible to insert that code after my code? Like this:


Please Login or Register to see this Hidden Content


Or exactly what are you suggesting? :)

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17600 posts

Posted 21 October 2012 - 09:51 AM

Well PHP isn't my forte. Therefore, I recommend if you need further assistance, you contact one of our Pros -

Please Login or Register to see this Hidden Content