• Resolved kent100

    (@kent100)


    Is there a way to filter the directory by state? For example, I would like the user to have the ability to show only entries from their state.

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    Please navigate to the Connections Settings admin page and click the Advanced tab.

    Scroll to the Permalinks section and enable the Region (state) permalink option.

    With this option enabled, the state part of the address will be displayed as a permalink. When that link is clicked, the directory will be filtered by the state name that was clicked.

    I hope this helps. Please let me know.

    Thread Starter kent100

    (@kent100)

    Thank you! That worked well.

    Since then I have actually purchased and installed the Circled theme. It looks fantastic and I really like the entire plugin.

    I just had two additional questions for the Circled theme:

    1. Is there a way to get the state/region to display in the layout (not the individual profile)?

    2. Is there a way to make the photo/name linkable to the profile page (like the “view profile” link)?

    Thanks!

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Both can only be accomplished by making edits to the template’s PHP files. If you are comfortable making PHP code changes, I can provide some guidance.

    Thread Starter kent100

    (@kent100)

    Thank you. That would be great.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    First, you should read over the Template Override File developer doc.:

    This is important so the changes to the template file will not be overwritten when template updates are released.

    The first change, make the image a permalink to the Entry detail/profile page.

    Open the card.php file found in the following folder:

    • ../wp-content/plugins/connections-circled

    Change the following from:

    	<?php $entry->getImage(
    		array(
    			'image'    => $atts['image'],
    			'height'   => $atts['image_width'],
    			'width'    => $atts['image_width'],
    			'fallback' => array(
    				'type'     => $atts['image_fallback'],
    				'string'   => $atts['str_image'],
    				),
    		)
    	); ?>

    to this:

    	<?php $entry->getImage(
    		array(
    			'image'    => $atts['image'],
    			'height'   => $atts['image_width'],
    			'width'    => $atts['image_width'],
    			'fallback' => array(
    				'type'     => $atts['image_fallback'],
    				'string'   => $atts['str_image'],
    				),
    			'permalink' => cnSettingsAPI::get( 'connections', 'connections_link', 'name' ),
    		)
    	); ?>

    For the second change, add the following line of code where you wish the state to be displayed.

    $entry->getAddressBlock( array( 'format' => '%state%' );

    I hope this helps! Please let me know.

    Thread Starter kent100

    (@kent100)

    Thank you! That worked and was very helpful.

    One last question — I really appreciate all the help.

    My goal is to build a directory where someone can select the category and the state from the main directory page. For example, someone could select “Italian Restaurants” in “California” and then have the directory return those results.

    Is there some way to do this?

    I will make sure to leave a great review for this plugin and your awesome support!

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Apologies for the delay in my reply!!!

    There might be an option available. Could you please open a support ticket in your account to discuss this further:

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Filter by State’ is closed to new replies.