[Resolved] If is wpsp_id?

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support If is wpsp_id?

This topic contains 5 replies, has 2 voices, and was last updated by  Jamal 2 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2007

    Jamal
    Participant

    Hi Tom

    I would like to hook into before_content of a specific list, how would i go about it? Below is what i have currently and the colon between field label and value is appearing on all my wpsp lists

    add_action( 'wpsp_before_content','wpsp_add_custom_meta' );
    function wpsp_add_custom_meta()
    {
    
    $field_name = "Måndag";
    $field = get_field_object($field_name);
    
    echo $field['label'] . ': ' . $field['value'];
    }
    #2009

    Tom
    Keymaster

    Any chance I can send you the latest beta versions? There’s a way to do it, but I want you to use the way that’s going to work moving forward 🙂

    #2012

    Jamal
    Participant

    Absolutely. Just sent you my email adress.

    #2018

    Jamal
    Participant

    I have the latest files installed Tom and ready to give this a try.

    #2025

    Tom
    Keymaster

    K, try this:

    add_action( 'wpsp_before_content','wpsp_add_custom_meta' );
    function wpsp_add_custom_meta( $settings ) {
    
        if ( 10 == $settings[ 'list_id' ] ) {
            $field_name = "Måndag";
            $field = get_field_object($field_name);
    
            echo $field['label'] . ': ' . $field['value'];
        }
    
    }

    So you would just change the 10 to your list ID.

    #2031

    Jamal
    Participant

    Excellent, thanks !

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.