Results 1 to 2 of 2

Thread: Custom loop to figure out the posted by ______ easy one!

  1. #1
    Thread Starter
    Member zuko's Avatar
    Join Date
    Apr 2011
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 1 Time in 1 Post

    Custom loop to figure out the posted by ______ easy one!

    I'm building a private messaging system.

    I want a button on each add that auto fills the "send to" field with the user that posted the ad..

    This field will be hidden (to make it look more PM style)

    Then they can send the message.

    So my custom widget I'm building needs a loop that figures out the user

    I've found this

    PHP Code:
                        <li><span><?php _e('Listed by:','appthemes');?></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 get_author_posts_url(get_the_author_id()); ?>"><?php the_author_meta('display_name'); ?></a>
                                <?php
                                    
    } else {
                                        echo 
    get_post_meta($post->ID'name'true);
                                    } 
    ?>

                          <?php } else { ?>
                                        <a href="<?php echo get_author_posts_urlget_the_author_meta('ID') ); ?>"><?php the_author_meta('display_name'); ?></a>
                            <?php
                                
    }
                            
    ?>
                        </li>

                        <li><span><?php _e('Member Since:','appthemes');?></span> <?php echo date_i18nget_option('date_format'), strtotimeget_the_author_meta('user_registered') ) ); ?></li>
    Which looks like it does what I need..

    Is there a loop that does what I'm looking for already in classipress or wordpress?

    And have I found?

    Something like "Get_author_name;()"

  2. #2
    Thread Starter
    Member zuko's Avatar
    Join Date
    Apr 2011
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 1 Time in 1 Post
    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. Showing custom fields on the loop-ad
    By drabello in forum ClassiPress General Discussion
    Replies: 2
    Last Post: December 14th, 2010, 05:04 PM
  2. Spacing issue can't figure out.
    By rtibbs4 in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 23rd, 2010, 02:08 PM
  3. Can't figure out blog settings
    By sarge in forum Help Using ClassiPress
    Replies: 14
    Last Post: April 16th, 2010, 06:49 PM
  4. Spacing issue can't figure out.
    By rtibbs4 in forum Help Using ClassiPress
    Replies: 0
    Last Post: December 31st, 1969, 06:00 PM