Black Friday sale! Get 25% off WPSP Pro! Discount automatically applied at checkout.

[Resolved] Geodirectory Listings

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Geodirectory Listings

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19022
    Gary
    Participant

    I am able to get posts to show in the way I wanted using this plugin for thanks! It Great!

    But, I have a number of CPT’s from Geodirectory where I would like to show more than simply the title, featured images and excerpt. Posts belonging to these CPT’s have a variety of metadata (beyond date, author, etc) and I would like to know if there is anyway of adding them. For example, I would like to add an address and business hours. Is this a possibility? I cannot find it.

    Many thanks, Gary

    #19076
    Tom
    Keymaster

    Hi there,

    You would need to use our hook system to add your custom fields: https://wpshowposts.com/support/topic/custom-fields/#post-220

    Let us know if you need more info 🙂

    #19116
    Gary
    Participant

    Thanks Tom.

    I struggled as I was able to call the custom field but couldn’t get the format. However, it turned out that I could echo call the shortcode and it now works perfectly.

    add_action( 'wpsp_after_title', function() {
        $meta = get_post_meta( get_the_ID(), 'geodir_business_hours', true );
    
        if ( $meta ) {
            echo do_shortcode( '[gd_post_meta key="business_hours" show="value"]' );
        }
    } );
    #19139
    Tom
    Keymaster

    Awesome, glad you got it working 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.