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.23, category, category_in, shortcode
- This topic has 3 replies, 2 voices, and was last updated 6 years, 7 months ago by
Steven Zahm.
-
AuthorPosts
-
09/01/2016 at 1:48 pm #389187
Pam
GuestI deleted an entry from a category so that I could create its own special category and display it above its original category. My page’s shortcodes look like this:
[connections category=10]
[connections category=9]The entry was deleted from category 9 and reassigned with category 10. Despite removing category 9 from the entry’s categories, the entry is now displaying in both categories 9 and 10 (and thus, displaying twice). On the website’s front end, only category 10 is displayed on the entry’s list of categories. Category 9 is not listed, despite the entry displaying where the category 9 entries are displaying.
How can I get the entry to stop displaying in category 9?
09/01/2016 at 2:07 pm #389190Steven Zahm
Keymaster@ Pam
Are you using page caching? Either with a plugin or server side? If you are, flush your page cache.
If you are not using page caching, please share screenshots of the category selection for both entries. Thanks!
09/02/2016 at 9:18 am #389324Pam
GuestHi, No, I am not using any caching plugins.
Front end of website displaying problem:
List of entry’s categories in the backend:
The entry belongs to the category ELC Director, which is category 10. Category 9 is ELC Staff, which is unchecked. I think I might see the problem now, though. Even though ELC Staff is unchecked, maybe the plugin still considers this entry to be a member of ELC Staff because category 10 is a sub category of category 9? I can certainly try changing the ELC Director category to not be a sub category of category 9.
Update: It worked, although I do consider it confusing that an entry is still considered to belong and display in a parent category even if that parent category is not checked.
09/02/2016 at 10:10 am #389354Steven Zahm
Keymaster@ Pam
re: Update: It worked, although I do consider it confusing that an entry is still considered to belong and display in a parent category even if that parent category is not checked.
Correct, because if an entry is assigned a category which is a child of the parent being requested, it is in the parent as well as the child. This is modelled after how WordPress handles category relationships using the same options. This is done so the behavior is the same and expected since it is consistent with how WordPress handles the category relationships.
To get the results you are looking for, make the parent category of ELC Director to Teaching Staff.
Another way to handle this, keaving your category structure as is, is to use the category_in shortcode option. For this to work all the entries will have to be assigned the Teaching Staff category in addition to the ELC Staff or ELC Director as appropriate. The shortcodes would the be this:
[connections category_in="x,10"]
[connections category_in="x,9"]*change
x
to the category ID for Teaching Staff. With this setup, an entry would have to be within both categories to be listed because thecategory_in
option will not traverse the category tree.I think just using this will work too:
[connections category_in=10]
[connections category_in=9]If it does, that would be the quickest easiest to implement.
Hope that helps!
-
AuthorPosts
You must be logged in to reply to this topic.