Results 1 to 3 of 3

Thread: Displaying posts by author in slider

  1. #1
    Thread Starter
    Member
    Not a Verified Customer
    Cyrus's Avatar
    Join Date
    May 2009
    Location
    Curacao, Netherlands Antilles
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying posts by author in slider

    Hey I'm trying to create a custom page template where the posts of the user JOHN are displayed in the slider(all his posts).

    Could anyone help me out with the code in order to achieve this?
    Here's the code of the slider of the index page:
    Code:
    <?php if (get_option('cp_enable_featured') <> 'no') { ?>
    
    			  <?php query_posts(array('post__in' => get_option('sticky_posts'), 'post_status' => 'publish', 'orderby' => rand)); ?>
    
    				<?php if (have_posts()) : ?>
    			 
                <div class="shadowblock_out">
                    <div class="shadowblockdir">
    
                        <h2 class="dotted"><?php _e('Featured Listings','cp')?></h2>
                        <div class="sliderblockdir">
    
                            <div id="list">
                                <div class="prev"></div>
                                <div class="slider">
                                    <ul>
    
                                        <?php while (have_posts()) : the_post(); ?>
    
                                            <?php if (in_category(CP_BLOG_CAT_ID) || cp_post_in_desc_cat(CP_BLOG_CAT_ID) ) continue; // don't show any blog posts ?>
    [*]
                                                <span class="feat_left">"><?php if(get_post_meta($post->ID, 'images', true)) cp_single_image_legacy($post->ID, get_option('thumbnail_size_w'), get_option('thumbnail_size_h')); else cp_get_image_url_feat($post->ID, 'thumbnail', 'captify', 1); ?><div class="clr"></div><span class="price_sm"><?php if(get_post_meta($post->ID, 'price', true)) cp_get_price_legacy($post->ID); else cp_get_price($post->ID); ?></span></span>
                                                
    
    <?php if (strlen(get_the_title()) >= get_option('cp_featured_trim')) echo substr(get_the_title(), 0, get_option('cp_featured_trim')).'...'; else the_title(); ?> </p>
                                            
    
                                        <?php endwhile; ?>
    [/list]
                                </div>
    
                                <div class="next"></div>
    
                            </div>
    
                            <div class="clr"></div>
    
                        </div>
    
                    </div>
    
                </div>
    			 <?php endif; ?>

  2. #2
    Veteran bluecafe's Avatar
    Join Date
    Apr 2010
    Location
    Berlin
    Posts
    1,563
    Thanks
    58
    Thanked 359 Times in 273 Posts

    Re: Displaying posts by author in slider

    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    Member
    Not a Verified Customer
    Cyrus's Avatar
    Join Date
    May 2009
    Location
    Curacao, Netherlands Antilles
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying posts by author in slider

    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)