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.5.32, cn_entry_action_back_atts, filter
- This topic has 2 replies, 2 voices, and was last updated 9 years, 6 months ago by
Michelle Forbes.
-
AuthorPosts
-
01/30/2017 at 4:24 pm #409203
Michelle Forbes
ParticipantHi, I changed the Go back to directory. to something different in “Say What” that pertains more to the category I am using it for, works well. I want to create a new category for different entities. Is there a way to change the Go back to directory. to say something different for the new category?
First category is for shops so my new text says, “Back to all Shops.” The new category will be for sponsors, so would like it to say, “Back to Our Sponsors.”
Thanks!
01/31/2017 at 12:56 pm #409363Steven Zahm
Keymaster@ Michelle
The only this could be done is thru PHP code. You would have to hook into the
cn_entry_action_back_attsfilter and change the text option based on the category that is being viewed. Something like this:function my_custom_cn_back_link( $atts ) { if ( cnQuery::getVar( 'cn-cat-slug' ) ) { // If the category slug is a descendant, use the last slug from the URL for the query. $categorySlug = explode( '/' , cnQuery::getVar( 'cn-cat-slug' ) ); if ( isset( $categorySlug[ count( $categorySlug ) - 1 ] ) ) $categorySlug = $categorySlug[ count( $categorySlug ) - 1 ]; $term = cnTerm::getBy( 'slug', $categorySlug, 'category' ); $category = new cnCategory( $term ); switch ( $category->getID() ) { case x: $atts['text'] = 'Back to all Shops'; break; case y: $atts['text'] = 'Back to Our Sponsors'; break; } } return $atts; }You would change
xandyin the code above to the correct category ID. To add more you would add additional case statements.Hope this helps!
02/11/2017 at 6:46 pm #411033Michelle Forbes
Participantthank you! I will give it a try!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
