Results 1 to 9 of 9

Thread: Can't re-order tabs as use "other items for sale by this member" query

  1. #1
    Thread Starter
    Veteran doctorcilantro's Avatar
    Join Date
    Oct 2010
    Location
    Saudi Arabia
    Posts
    759
    Thanks
    2
    Thanked 26 Times in 16 Posts

    Can't re-order tabs as use "other items for sale by this member" query

    I want to re-order Priceblock tabs in sidebar.php.

    I want Member to show first because Contact takes up a ton of space, when you do this the Subject of contact form becomes incorrect due to the sidebar-contact.php pulling from the list of other items the member has for sale.

    This is due to the query run to get the other posts by a member - <?php the_title();?> which is what sidebar-contact.php uses but it then pulls the last item in the array and the contact form is incorrect.

    I assume this would happen on 3.5 too. My code below:

    <?php



    global $userdata;



    // make sure google maps is enabled

    $gmap_check = get_option('cp_gmaps_key');



    ?>



    <!-- right sidebar -->

    <div class="content_right">





    <div class="tabprice">



    <ul class="tabnavig">

    <li><a href="#priceblock1"><span class="big"><?php _e('Member', 'cp') ?></span></a></li>

    <li><a href="#priceblock2"><span class="big"><?php _e('Buy Now', 'cp') ?></span></a></li>





    </ul>







    <!-- tab 1 -->

    <div id="priceblock1">



    <div class="clr"></div>



    <div class="singletab">



    <div class="priceblocksmall dotted">





    <p align="center" class="member-title"><?php _e('Information about this Stereolisting','cp');?></p>











    <ul class="member">

    <p><span><?php _e('For sale by:','cp');?></span>

    <?php

    // check to see if ad is legacy or not

    if(get_post_meta($post->ID, 'name', true)) {

    if (get_the_author() != '') { ?>

    <a href="<?php echo CP_AUTHOR_PATH . strtolower(get_the_author_meta('user_login')); ?>"><?php the_author_meta('display_name'); ?></a>

    <?php

    } else {

    echo get_post_meta($post->ID, 'name', true);

    } ?>



    <?php } else { ?>

    <a href="<?php echo CP_AUTHOR_PATH . strtolower(get_the_author_meta('user_login')); ?>"><?php the_author_meta('display_name'); ?></a>

    <?php

    }

    ?>

    </p>

    <p><span><?php _e('View or write feedback for:','cp');?></span>

    <a href="<?php echo get_option( 'siteurl' ). "/feedback/" . strtolower(get_the_author_meta('user_login')); ?>"><?php the_author_meta('display_name'); ?></a>

    </p>







    <ul>



    <?php query_posts(array('posts_per_page' => 3, 'post_status' => 'publish', 'author' => get_the_author_meta('ID'), 'orderby' => RAND, 'post__not_in' => array($post->ID))); ?>

    <p>Other Stereolistings by this member:</p>

    <?php if(have_posts()) : ?>



    <?php while(have_posts()) : the_post() ?>



    <li>

    <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>

    </li>



    <?php endwhile; ?>



    <?php else: ?>



    <li><?php _e('No other ads by this poster found.','appthemes'); ?></li>



    <?php endif; ?>



    </ul>



    <p align="center"><b><em><a href="<?php echo get_author_posts_url(get_the_author_id()); ?>" class="btn"><span><?php _e('View all ads by','appthemes'); ?> <?php the_author_meta('display_name'); ?> &raquo;</span></a></em></b></p>



    </ul>



    <div class="clr"></div>



    </div>



    </div><!-- /singletab -->



    </div><!-- /priceblock1 -->



    <!-- tab 2 -->



    <div id="priceblock2">



    <div class="clr"></div>



    <div class="singletab">



    <?php if (get_option('cp_ad_inquiry_form') == 'yes' && is_user_logged_in()) {



    include_once(TEMPLATEPATH . '/includes/sidebar-contact.php' );



    } elseif (get_option('cp_ad_inquiry_form') <> 'yes'){



    include_once(TEMPLATEPATH . '/includes/sidebar-contact.php' );



    } else {

    ?>

    <div class="pad25"></div>

    <p class="contact_msg center"><strong><?php _e('You must be logged in to inquire about this ad.', 'cp') ?></strong></p>

    <div class="pad100"></div>

    <?php } ?>



    </div><!-- /singletab -->



    </div><!-- /priceblock2 -->





    <!-- tab 3 -->















    </div><!-- /tabprice -->













    <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar_ad')) : else : ?>



    <!-- no dynamic sidebar so don't do anything -->



    <?php endif; ?>





    </div><!-- /content_right -->

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,689
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Veteran doctorcilantro's Avatar
    Join Date
    Oct 2010
    Location
    Saudi Arabia
    Posts
    759
    Thanks
    2
    Thanked 26 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    Veteran doctorcilantro's Avatar
    Join Date
    Oct 2010
    Location
    Saudi Arabia
    Posts
    759
    Thanks
    2
    Thanked 26 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,689
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  6. #6
    Thread Starter
    Veteran doctorcilantro's Avatar
    Join Date
    Oct 2010
    Location
    Saudi Arabia
    Posts
    759
    Thanks
    2
    Thanked 26 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #7
    Thread Starter
    Veteran doctorcilantro's Avatar
    Join Date
    Oct 2010
    Location
    Saudi Arabia
    Posts
    759
    Thanks
    2
    Thanked 26 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #8
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,689
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  9. #9
    Thread Starter
    Veteran doctorcilantro's Avatar
    Join Date
    Oct 2010
    Location
    Saudi Arabia
    Posts
    759
    Thanks
    2
    Thanked 26 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding "Other items listed by" to 3.0.4
    By doctorcilantro in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: January 11th, 2011, 01:44 PM
  2. Replies: 7
    Last Post: December 12th, 2010, 01:28 PM
  3. Add "SOLD" to items that are gone
    By tiffany in forum ClassiPress General Discussion
    Replies: 3
    Last Post: May 29th, 2009, 01:32 AM