Add a second Wordpress Loop that displays latest posts in single.php -


I am creating my own theme, but only basic knowledge of PHP is searching for a way to do it online Yes, but it can not seem to be across.

This is my development server's URL:

I have a secondary loop in each page on the sidebar, which displays all the late posts. This is straightforward on the main index.php file.

I'm not sure where it starts working on the Single.php file. I understand that he understands the concept of wordpress loop, and why it will not work within the category of post page, but there is no way around it?

Thanks

Add it to your sidebar:

  $ today = getdate (); $ Sidebarquery = New WP_Query ('year ='. $ Today ["year"]. Amp; monthnum = '. $ Today ["Som"].' & Amp; day = '. $ Today ["mday"]) ; While ($ sidebarquery- & gt; is_pos ()) {$ sidebarquery- & gt; The_post (); Echo & lt; Li & gt; '. The_permalink (); . '& Lt; / Li & gt; '; }    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -