Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Show the location ( City and State ) on posts list

  1. #1
    Thread Starter
    Senior Member bundyla's Avatar
    Join Date
    Oct 2010
    Posts
    132
    Thanks
    13
    Thanked 7 Times in 1 Post

    Lightbulb Show the location ( City and State ) on posts list

    For everybody who wants to know how to put the city and province to the listings and even add a link to them in order to search only for the listings from that city or province, than here is the code which is working for me right now.

    It has to be put in index-directory.php, index-standard.php, search.php and archive-default.php and inside this code:

    <p class="bot4px dotted"><?php _e('Category','cp') ?>: <?php the_category(', ') ?> | <?php _e('Listed:','cp') ?> <?php echo cp_ad_posted($post->post_date); ?>HERE IT MUST BE INSERTED</p>

    The script to insert is:

    <br /> <?php _e('Location','cp') ?>: <a href="?s=<?php echo get_post_meta($post->ID, 'cp_city', true); ?>" title="Click to view all posts in this city."><?php echo get_post_meta($post->ID, 'cp_city', true); ?></a>,</span><a href="?s=<?php echo get_post_meta($post->ID, 'cp_state', true); ?>" title="Click to view all posts in this province."><?php echo get_post_meta($post->ID, 'cp_state', true); ?></a></strong>

    Hope it helps. Regards

  2. The Following 7 Users Say Thank You to bundyla For This Useful Post:

    bellboy (October 27th, 2010), bursaemlak (February 20th, 2012), dikiyforester (December 8th, 2011), etune (December 1st, 2010), kylesalonga (August 29th, 2011), pratish7 (November 4th, 2010), rtibbs4 (August 29th, 2011)

  3. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,008
    Thanks
    170
    Thanked 3,409 Times in 3,280 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.

  4. #3
    Junior Member kittycat's Avatar
    Join Date
    Oct 2010
    Posts
    36
    Thanks
    5
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #4
    Thread Starter
    Senior Member bundyla's Avatar
    Join Date
    Oct 2010
    Posts
    132
    Thanks
    13
    Thanked 7 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,008
    Thanks
    170
    Thanked 3,409 Times in 3,280 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.

  7. #6
    Rookie jcalvar2's Avatar
    Join Date
    Jul 2011
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #7
    Junior Member gaspar's Avatar
    Join Date
    May 2011
    Location
    Hungary
    Posts
    23
    Thanks
    3
    Thanked 2 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #8
    Junior Member gaspar's Avatar
    Join Date
    May 2011
    Location
    Hungary
    Posts
    23
    Thanks
    3
    Thanked 2 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. The Following 2 Users Say Thank You to gaspar For This Useful Post:

    cedricde (November 22nd, 2011), markweb (September 29th, 2011)

  11. #9
    Junior Member anto65's Avatar
    Join Date
    Jan 2011
    Location
    Italy
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  12. #10
    Amateur toantran's Avatar
    Join Date
    Jul 2011
    Location
    Vietnam
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: September 25th, 2010, 05:42 PM