• Resolved ferahl

    (@ferahl)


    Hi I have a front page template which displays a certain category_name as a slideshow, and then is supposed to display the_content of the page.

    I start by storing the page id:
    $template_id = $post->ID;

    The slideshow is next so I make a query:
    query_posts(‘category_name=”front-slideshow”‘);

    And then below that I am supposed to get the contents of the page in another (loop?):

    query_posts('p='.$template_id);
    if(have_posts()) while(have_posts()) : the_post();
    	$content = the_content();
    endwhile;

    But it gives me nothing despite having the correct ID, If I put an id of any other page it works.

    However if I put the content loop above the query_posts(‘category_name.. query it works fine (with no query necessary. But I can’t do that since I want short codes and calling get_the_content for later display doesnt render out shortcodes, only the_content does)

    Any help much appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter ferahl

    (@ferahl)

    Nevermind. I can call get_the_content at the top and after the slideshow call do_shortcode(content) so that I can still have shortcode features.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with loop design in template’ is closed to new replies.