BBPress Brian Auxier : Replies Created

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Custom Fields #339690
    Brian Auxier
    Participant

    sorry that was missing parts of the code:

    echo if ( ! empty( $text ) ) '' . esc_html( $text ) . '';
    
    in reply to: Custom Fields #339689
    Brian Auxier
    Participant

    I am following the quicktip: QuickTip: Custom Field – Adding a Text Field. The snippet adds the custom field on the add new entry/manage page. That part is working just fine. If I enter the code from the second part of the QuickTip, The section of code that goes into the card.php file, that is where I am having issues. If I post between the PHP tags I get this error Parse error: syntax error, unexpected ‘if’ The code on the line that it is referencing is this:
    echo if ( ! empty( $text ) ) ‘

    ‘ . esc_html( $text ) . ‘

    ‘;

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