Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Custom Post Type Loop Doesn't Work On Single Template

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #173558
    Steven Morgan
    Participant

    Any idea why this wouldn’t work on the single page?
    I’m running this loop on page.php and it returns results, but once I go to a single.php page it returns nothing.

    NOTE: I had to remove all the php tags because of a formatting issue when posting on the site.

    query_posts('posts_per_page=-1&post_type=music');
    
    if (have_posts()) : while (have_posts()) : the_post();
      <li>
        <a>
          the_excerpt();
        </a>
      </li>
    
    endwhile; 
    else : 
    endif; 
    
    #173559
    Steven Morgan
    Participant
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.