@ 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 the class.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 6 years, 4 months ago by
Steven Zahm. Reason: Fix code block