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.17
- This topic has 15 replies, 2 voices, and was last updated 5 years, 1 month ago by
Steven Zahm.
-
AuthorPosts
-
04/19/2018 at 12:52 pm #459602
contactbirthingfromwithin-com
ParticipantFor each listing shown on a category page such as this: https://bit.ly/2HMGFxS
I want to show their CITY above or high up on the listing. I added a custom field of City to the listing.
How can this be possible? Otherwise they are arriving on a page with a list for everyone in that state without knowing what town they are in.
Thanks!
04/19/2018 at 1:27 pm #459605Steven Zahm
Keymaster@ Erika
You will have to edit one of the template’s PHP file. The
card.php
file to be exact. You will like have to add some CSS too to account for the addition. Here’s the link to the developer documentation on how to add a custom template override file.04/19/2018 at 2:04 pm #459606contactbirthingfromwithin-com
ParticipantWhat specifically do i need to add to the card.php file to make the city custom field visible above the listing name?
04/19/2018 at 2:22 pm #459607Steven Zahm
Keymaster@ Erika
Here’s the link to the developer documentation for a custom text field. It covers the code necessary to display the field within a template file. Perhaps I should add a subhead… the relevant section is the last few paragraphs before the “Export the Field” subhead.
04/19/2018 at 2:51 pm #459609contactbirthingfromwithin-com
Participantoof this is not fun. Based on the link provided above i have created the following snippet to be added to card.php in my childtheme connections-templates / circled folder. a) is this correct? my custom field name is city b) i don’t know where to add it in the card.php file.
File attached.
Attachments:
You must be logged in to view attached files.04/19/2018 at 3:35 pm #459612Steven Zahm
Keymaster@ Erika
That is the code to register the custom field, you should not be adding that to the
card.php
file. You should add that coide using the Code Snippets plugin as described in the developer documentation link from my previous reply.The code that should be placed in the custom template override file is in the section right before the “Export the Field” section.
As for where you put the override file itself… well, that depends entirely on your setup. If you have a parent and child theme, then yes, that folder would be a correct folder. However if you do not have a child theme that that would be the wrong folder because there is no child theme. When I do custom work, I place the files in this folder:
../wp-content/connections-templates/circled/
04/24/2018 at 2:02 pm #459967contactbirthingfromwithin-com
ParticipantNot sure i changed the settings in the snippet correctly because while the snippet saved, it doesn’t show the city field yet. Copy of snippet attached for review.
Attachments:
You must be logged in to view attached files.04/24/2018 at 2:06 pm #459969contactbirthingfromwithin-com
ParticipantWell vague progress. now it shows this gobbledygook code where the city should be!
http://birthingfromwithin.com.158-69-37-116.vanilla.websavers.ca/directory/bfw-colorado/
04/24/2018 at 2:49 pm #459978Steven Zahm
Keymaster@ Erika
RE: Well vague progress. now it shows this gobbledygook code where the city should be!
That is the code which you pasted in the template to display the custom text field you registered with the code snippet. Make sure that code is between
<?php
and?>
tags.If you do not, it is just text, not code, and will be displayed on the page instead of being run.04/24/2018 at 4:00 pm #460021contactbirthingfromwithin-com
ParticipantIt worked!!!! sorry i’m not skilled in php… Feeling pretty pleased with myself – thank you for your patient help.
Now as more profiles are added into a particular state, how is it determined which order the excerpts are listed in? Can they be alphabetized by city?
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.