Tagged: blog posts, category
-
AuthorPosts
-
April 25, 2023 at 4:25 pm #1405550
Is it possible to set the category dynamically for the Blog Posts element?
For example, I have a page /mypage which includes Blog Posts element with category set to ‘News’. I would like to be able to change the category to ‘Events’ or ‘Misc’ by changing the URL. So /mypage displays all categories by default but /mypage?category=news displays news only and /mypage?category=events displays only events.
Is there a way to make this possible? Or a different method to achieve the same result?
Many thanks
April 26, 2023 at 5:52 am #1405639Hey Rustybucket,
Thank you for the inquiry.
There is no option for this by default, unfortunately. You may need to install a plugin or extend the functionality of the blog posts element with the help of a third party developer. Please check the link below.
// https://kriesi.at/contact/customization
Best regards,
IsmaelApril 26, 2023 at 5:54 am #1405640Hi,
UPDATE: There is a possible solution but you have to use the Portfolio Grid element and its category sort option.
// https://kriesi.at/support/topic/portfilio-grid-pre-filtered/#post-1363125
Best regards,
IsmaelApril 26, 2023 at 10:21 am #1405678Thanks Ismael
You mention “extend the functionality of the blog posts element”, is there a hook I can use to achieve that? I can probably do the development myself but would be good to know what options are available (if any)?.
Thanks
April 27, 2023 at 10:00 am #1405789Hi,
Thank you for the update.
There are available hooks in the shortcode template but none would be useful for what you are trying to do. You may need to override the existing shortcode (enfold/config-templatebuilder/avia-shortcodes/blog) and customize it, or use it as a reference for a completely new element.
// https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
Best regards,
IsmaelApril 27, 2023 at 10:29 am #1405797That’s very helpful, thank you Ismael.
Perhaps a mechanism to allow the user to filter blog post categories could be considered for future Enfold update.
Thanks again
April 29, 2023 at 9:34 pm #1406020Hi,
Glad Ismael could help, this has been added to our feature request, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Dynamic category using Blog Posts element’ is closed to new replies.