Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.2.10, custom field
- This topic has 4 replies, 2 voices, and was last updated 11 years, 1 month ago by
Steven Zahm.
-
AuthorPosts
-
07/06/2015 at 5:16 pm #339637
Brian Auxier
ParticipantI am trying to add a custom field using the tile-plus template. I have installed snippet and was able to get the field to show in the admin section of connections but I am not able to get it to show on my website. Everytime I enter the code from the quick fix into the card.php file it just shows the text of the code. Can you help explain exactly how this should be done?
07/07/2015 at 10:01 am #339687Steven Zahm
Keymaster@ Brian
re: I am trying to add a custom field using the tile-plus template.
What custom field? One that you coded from scratch or to display the text of a Custom Field from the metbox when you add a new entry?
re: I have installed snippet and was able to get the field to show in the admin section
Which snippet? I give allot of those out in the forums.
re: Everytime I enter the code from the quick fix into the card.php file it just shows the text of the code.
If you are seeing the text of the, then you are not pasting the code in between the opening and closing php tags (
<?phpand?>).07/07/2015 at 12:56 pm #339689Brian Auxier
ParticipantI 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 ) . ‘
‘;
07/07/2015 at 12:59 pm #339690Brian Auxier
Participantsorry that was missing parts of the code:
echo if ( ! empty( $text ) ) '' . esc_html( $text ) . '';07/07/2015 at 4:27 pm #339697Steven Zahm
Keymaster**@ **
Oh, I see. Apologies for the misunderstanding!
The code does need to be in between the php tags and the error is typo on my part. That line should be this:
if ( ! empty( $text ) ) echo '<p>' . esc_html( $text ) . '</p>';I’ve fix the quicktip.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
