Support » Themes and Templates » How to display content inline within a template?

  • Resolved gaznev2000


    Hi all, currently working on this page.
    However, I can’t figure out how to get the accordion at the bottom to display inline, so that the footer responds to the accordion movement. I think it has something to do with nested loops but i’m not 100% sure. I am currently just using css to move the content container down, but i know this isn’t right. Also the accordion is only working sporadically and i’m not sure as to why, think its the lay out though.

    Hope you can help.

    My code is below:

    [That’s too much code for here and without the code buttons it may have been corrupted anyway. Please see: – use a pastebin to post code; ]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The markup is messed up.

    Right now the accordion section is put inside the roundabout slider, you have to take the whole accordion section out on its own.

    Thanks for the reply. so i should put in into its own loop?

    It doesn’t matter how you query up the contents, the bottom line is these 2 sections must be seperated, they can’t be inside the same html element.

    Considering the type of content, and how the content will be displayed, yes you should craft up different loop. The slider and the lists in accordion don’t mix, it’s entirely differnt thing.

    Thanks so much Paul. I’m am just doing a loop now. However, it isn’t displaying the content of the page, instead it’s displaying the full content of a previously stated category. Do i need to add a end previous loop function or something.


    You only have 1 loop there, and what you did there is altering the main loop. It’s doable, if done right, but is not a recommended method for a special template that requires multiple sections like this.

    In short, don’t use query_posts, use WP_Query method instead.

    Thanks for your help Paul. I managed to do it with

    <?php $query = new WP_Query( 'cat=3339' );; while($query->have_posts()) : $query->the_post();?>
           <?php the_content(); ?>
    <?php endwhile; ?>

    I also tried the post ID method but it didn’t work, thus I had to create a new cat and assign the post to it.

    Thank for your time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to display content inline within a template?’ is closed to new replies.