• Resolved gaznev2000

    (@gaznev2000)


    Hi all, currently working on this page.http://www.macsmagazine.com/health-living/horoscopes/.
    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:
    http://codex.wordpress.org/Forum_Welcome#Posting_Code – 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.

    Thread Starter gaznev2000

    (@gaznev2000)

    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.

    Thread Starter gaznev2000

    (@gaznev2000)

    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.

    Code

    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.
    http://codex.wordpress.org/Class_Reference/WP_Query

    Thread Starter gaznev2000

    (@gaznev2000)

    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.
    Gary

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