WordPress.org

Ready to get started?Download WordPress

Forums

My Post Order
Sections with different templates (4 posts)

  1. Amaca
    Member
    Posted 1 year ago #

    Hello again ;)
    i m using the custom template options, setting the loop.php in the custom template folder and editing it with my design options. (this is a great feature, thank you!!!)

    I was wondering if i can change the custom template for differents sections. For example: i have 2 sections, one called MAIN SLIDE and other called TOP POSTS and they are displayed in the same page on the layout. Can i use 2 different custom loops or a conditional like "if is mainslide then ..." or "if is top posts then" to display they with different design and layout?

    http://wordpress.org/extend/plugins/my-posts-order/

  2. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    It is quite interesting problem :)

    For now, I would suggest you to pass custom parameter in query_posts function.

    for eg.

    <?php
    query_posts('section_name=TOP POSTS'); ?>
    <ul>  <?php
        while ($the_query->have_posts()) : $the_query->the_post(); ?>
          <li>
            <span class="mpo_post_title">
              <a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>">
                <?php if ( get_the_title() ) the_title(); else the_ID(); ?>
              </a>
            </span>
          </li> <?php
        endwhile; ?>
      </ul>
  3. Amaca
    Member
    Posted 1 year ago #

    mmm it doesn't work for me...i receive always the posts of the first query with the first section...
    i tried to use <?php wp_reset_query(); ?> too but always the same problem.
    what do you think about it? can you give me some more specifical tips?

    thank you so much again for your great plugin, i ll send you my completed website when it's done to show you the final product.

  4. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Can you send me your theme folder?

    As per me it should work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.