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.
- This topic has 12 replies, 2 voices, and was last updated 5 years, 10 months ago by
Steven Zahm.
-
AuthorPosts
-
09/22/2016 at 6:08 pm #392738
Katelyn Thompson
ParticipantHello!
I am wondering how to make changes to the Member Directory page without it affecting the individual member pages.
I’ve made some style changes to this page: http://184.154.247.155/~busin814/member-directory such as centering the text and hiding the image with CSS. But I’ve noticed that these changes are also made on the individual pages such as this one: http://184.154.247.155/~busin814/member-directory/name/tracy-noble and this isn’t what I want to do.
Normally I’d target the Member Directory page’s page ID, but it seems that the Member Directory and the Individual Member pages all have the same page ID!!
How can I make styling changes to the directory page without it affecting the member pages?
Thank you!!
09/23/2016 at 10:07 am #392819Steven Zahm
Keymaster@ Katelyn
re: Normally I’d target the Member Directory page’s page ID, but it seems that the Member Directory and the Individual Member pages all have the same page ID!!
Yes, that is correct because you never leave the actual WP page when browsing the directory.
@ How can I make styling changes to the directory page without it affecting the member pages?
Well you have many options…
- The profile detail view have a
.cn-entry-single
class you could use to override the result list view style. - It looks like you have been editing the template directly, so, you could use inline CSS styles.
- If you are editing the template make sure you are following one of the following recommended ways or you will lose you changes on updates.
- You could also use custom CSS override files. You would create two files;
card-custom.css
andcard-custom-single.css
. The one without single in the name would load on the page results list view while the one with the single in its name would load on the single entry profile detail view.
Hope that helps!
09/25/2016 at 10:21 pm #393137Katelyn Thompson
ParticipantThank you!! That’s exactly what I needed!
I came across a few more questions, not sure if I should ask here or start a new thread:
My images are uploading with a weird dimension, as seen on this page:
http://184.154.247.155/~busin814/member-directory/name/guy-brami
Any idea how I can fix this?Where are the uploaded logos supposed to appear? I’m not seeing any logos on the single pages.
How can I make the “Title” on the Member Directory page link to the individual page? (Exactly how the person’s name links to their individual page.) For example, at the bottom of this page (http://184.154.247.155/~busin814/member-directory), when you click on “Sarah Duckham”, it takes you to her individual page. I’d like “Senior Attorney” to also take you to her individual page.
Thank you so much for all your help!!
09/25/2016 at 11:01 pm #393138Katelyn Thompson
ParticipantMy last question has a mistake:
I need to make the Category on the Member Directory page link to the individual page, NOT the person’s title. Example (http://184.154.247.155/~busin814/member-directory): Bob Wilkoff’s name goes to his individual page, I need “Architect” to go to his individual page as well.
Thanks again!!
09/26/2016 at 10:50 am #393252Steven Zahm
Keymaster@ Katelyn
re: My images are uploading with a weird dimension, as seen on this page:
http://184.154.247.155/~busin814/member-directory/name/guy-brami
Any idea how I can fix this?I suspect you set the image crop mode to “Resize to fit the specified dimensions (no cropping)” for the Medium Image Setting on the Connections : Settings admin page. I highly recommend change the settings back to their defaults. In this case the crop mode should be “Crop and resize proportionally to best fit the specified dimensions, maintaining the aspect ratio.“.
re: I need to make the Category on the Member Directory page link to the individual page,
You would use the
$entry->getCategory()
function to return the array of category objects (cnTerm_Object) attached to an entry. Since you are attaching a single category to an entry you can pop off the first category object from the array and use the category->name link as the link text and use the$entry->getPermalink()
function for the linkhref
.Hope that helps!
09/29/2016 at 9:40 pm #393720Katelyn Thompson
ParticipantThat fixed the image problem!! :)
The other part is a tad over my head. I can’t get the php tags to show up here so I’ll attach a screenshot of the code I have. How can I turn the category part into a link to the individual member page? Each category only has (and will always only have) 1 person attached to it.
To go along with this, when I click a category in the sidebar on the home page (http://184.154.247.155/~busin814), it takes you to a category page, where you then have to click again to see the person’s individual page. How can I make it go directly to the individual member’s page when you click the category?
Another thing I can’t figure out: how can I make changes to files in: connections -> includes -> template? I made a change to class.template-parts.php, but of course these changes will be overwritten when the plugin is updated. I tried duplicating the folder structure in my child theme and that didn’t work.
Lastly, how can I get both the logo and other image to show up at the same time?
Thank you so much for all your help!!!
Attachments:
You must be logged in to view attached files.09/30/2016 at 11:30 am #393823Steven Zahm
Keymaster@ Katelyn
re: How can I turn the category part into a link to the individual member page? Each category only has (and will always only have) 1 person attached to it.
Not tested but something like this:
$terms = $entry->getCategory(); //Get all categories attached to entry. $term = $terms[0]; // Pop off the first category assigned to entry. $url = $entry->getPermalink(); Get the permalink to the entry. //Display the link. echo '<a href="' . esc_url( $url ) . '">' . esc_html( $term->name ) . '</a>'
re: To go along with this, when I click a category in the sidebar on the home page (http://184.154.247.155/~busin814), it takes you to a category page, where you then have to click again to see the person’s individual page. How can I make it go directly to the individual member’s page when you click the category?
That’s not possible. You would have to write a custom widget to display the category names but link to the entry attached to the category. Since you have a limited number of categories it is likely far easier and quicker to create a new Menu on the WordPress Menus admin page using custom links. You would add a Custom Link to the menu for each category/entry link. After you do that, you can use the WordPress Custom Menu widget to place you newly created custom menu in the sidebar.
re: Another thing I can’t figure out: how can I make changes to files in: connections -> includes -> template? I made a change to class.template-parts.php, but of course these changes will be overwritten when the plugin is updated. I tried duplicating the folder structure in my child theme and that didn’t work.
Now, you can not do that… that file is a core file and can not be overridden. What changes are you making?
You can override the template files as mention in a previous reply. I suggest doing your changes here instead.
re: Lastly, how can I get both the logo and other image to show up at the same time?
You can use the
$entry->getImage()
function. The code is documented in theclass.entry-output.php
in../connections/includes/entry/
You would call it once for the image and another for the logo like this:$entry->getImage(); // Displays photo.
$entry->getImage( array( 'image' => 'logo') ); // Displays logo.
Hope that helps!
-
This reply was modified 5 years, 10 months ago by
Steven Zahm. Reason: Fix code block
09/30/2016 at 11:52 pm #393861Katelyn Thompson
ParticipantThat’s all exactly what I needed!!! Thank you so much!
With regards to the class.template-parts.php file, I changed the wording on the single members page from “Go to directory.” to “Return to directory”.
I didn’t see anywhere in the template files to make this change, which is why I went looking in the core files.
10/01/2016 at 9:55 am #393902Steven Zahm
Keymaster@ Katelyn
re: That’s all exactly what I needed!!! Thank you so much!
No problem. I did noticed my code example was malformed by the forum plugin. I fixed it.
re: With regards to the class.template-parts.php file, I changed the wording on the single members page from “Go to directory.” to “Return to directory”. I didn’t see anywhere in the template files to make this change, which is why I went looking in the core files.
Ok, editing the file is one way, but, I recommend the method outline in this tutorial on how to change strings in Connections. This will be update safe and the same method can be used on any plugin which was properly coded for translation. So I am sure you find many uses for it. I know many other do after I show them how ;)
10/05/2016 at 7:26 pm #394389Katelyn Thompson
ParticipantThat’s a great plugin! Thanks!
I’m noticing something else now. I edited the CSS for this:
#cn-card .cn-list-row, #cn-card .cn-list-row-alternate {box-sizing:border-box !important; display:inline-block; margin:0 auto; width:33% !important; vertical-align:middle;}
<h1>cn-card .cn-list-row-alternate {max-width: calc( 33% - 10px ) !important;}</h1>
To get the 3 column result on this page: http://184.154.247.155/~busin814/member-directory
But now on the individual member pages, the width is also 33% wide, and I want it to be 100% wide. http://184.154.247.155/~busin814/member-directory/name/adam-lowe
How can I display the members in 3 columns in the directory and then have their main pages be wider?
Thanks again so much for your help!!
- The profile detail view have a
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.