Skip to main content

Use ACF for categories in post element

Answered

Comments

6 comments

  • K C George

    Hi Thorsten,

    You can include and exclude specific Categories in the Posts element. You don't need Advanced Custom Fields plugin for this feature to work. 

    I could not fully understand your need/reason for suggesting dynamic selection of categories. Can you describe the outcome you have in mind?

     

    0
  • Thorsten Pilpin

    Thanks for the quick feedbackk, KC.

    Ok, but i really want to have it dynamic (i think i want it).

    I have about 12 pages with the same layout, which includes, a title, a text block and the post element (category filter set manually on each page).

    Now when I change the layout of those pages, I have to adapt all 12 pages seperately. I want to avoid this. 

    My idea was to create a brizy template for those pages and then use ACF fields on the page definition. the post element in the template than uses the content of the ACF field defined on the page and sets the category include option accordingly.

    Maybe I missed something in your explanation - if so appreciate more insights - I am not very techy though!

    0
  • K C George

    Hi Thorsten,

    Can you please share your URL? I would like to take a look at your 12 pages to understand your requirement better. 

    0
  • Thorsten Pilpin

    Hi KC,

    the URL is
    https://ifckdcncr.info

    It's a personal blog and under the main menu Thema (Topics) you will see a mega menu. Each of those entries lead to a separate WP page - all of them have the same structure and elements (Title, text and brizy post element).

    One of those pages:
    https://ifckdcncr.info/mein-blog/sphinkter/

    Now imagine I want to change something on the layout, I will have to implement the changes on all pages individually.

    To avoid this i though to create a brizy template and use ACF to specify the category used in the brizy post element.

    Does this help to better understand my challenge? Thanks.

    0
  • K C George

    Hi Thorsten,

    We are sorry; with the post element, you do not have an option to select categories dynamically. It needs to be selected for each page manually.

    Here is a possible work around you can consider. 

    1. Install WP Show Posts plugin and setup different category listings in the plugin 
    2. Under Appearance - Widgets, add different category listing short codes to different widgets
    3. In the pages/posts where you want to lists a specific category blogposts, add the "Sidebar" element and select a specific sidebar to display a specific category.

    Please watch this video for the procedure. https://jmp.sh/bY3Ah45

    0
  • Thorsten Pilpin

    Hi KC,

    again thanks for your quick reply.

    Is this a potential feature for brizy in the future or is it totally out of scope?

    Thanks for the hint regarding other plugins, which is if course a valid solution. In fact I have a paid plugin with which I could achieve this.

    However I want to avoid using additional plugins as much as possible. Also in regards to design breaks you have when using different plugins. That's why I wanted to use brizy as pure as possible. And since the post element is now available within brizy it provides me with most of functions (design, filtering, navigation, etc.) which I need. Except the dynamic settings for categories.

    For now I will stay with the way I have set the things up. Thanks for your help anyway - I appreciate it very much!

    0

Please sign in to leave a comment.