php - Reverse the way of function output -


I am having difficulty retreating this loop.

Atm, Loop is showing the latest post first, because it seems that I get added to the top of any other array, while I want to show it first of all.

So my question is, how to show the oldest posts first, and finally the latest show?

This is the code that shows the latest posts first, while loop in some time:

  while ($ portfolio-> is_pos ()) {$ Portfolio- & Gt; The_post (); $ Post = get_post (); $ Output = '& Lt; One square = "w-portfolio-item-anchor" href = "javascript: zero (0);" Data-ID = "'$ Post & gt; Id.' '& Gt; } Return $ Output;  

Regards, Patrick

Reverse it For example, add your theme somewhere, before your loop:

  query_posts ($ query_string. "& Amp; order = ASC");  
< P> Or at present it is being asked where it is and make sure that and command = ASC are used.

Or, like @ ɴ -ᴀ -ᴛ-में is mentioned in a comment, change it:

  $ output. = '& Lt; one square = "w-portfolio-item-anchor" href = "javascript: sh NY 0); "Data-id =" '$ Post & gt; Id.' '& Gt;  

To do this:

  $ output = '& lt; One class = "w-portfolio-item-anchor" href = "javascript: zero (0);" data-id = "'$ post & gt; id.' '& Gt; $ Production;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -