• Resolved Damian P.

    (@damian-p)


    Hello

    First of all – that’s the best exptension for ACF I’ve ever seen. Especialy the possibility to create CPT and taxonomies. Great!

    So, if we talking about post types: when I create new Post Type and I select “Page attributes” in “Supports”, no page attributes are showing when during editing post. Can U help with that? πŸ™‚

    Regards!

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello Damian!

    Thanks for using ACF Extended, I’m glad you enjoy it πŸ™‚

    Concerning Post Types – Page Attributes. I just tested it and it works as expected. To make sure everything is correctly setup can you please check the following things:

    • When you’re editing a post of your post type, check the “screen options” tab on the right, and see if there is a “Post attributes” there
    • If you don’t have page templates defined in your theme, page attributes will simply show an “Order” metabox in the sidebar
    • If you’re developing your own theme, make you that you correctly created the style.css and index.php files (page attributes are kinda tied to theme)

    Let me know if that worked!

    Regards.

    Thread Starter Damian P.

    (@damian-p)

    Hi, thanks for responding!

    Ok, I but if CPT is hierarchical – like a page, shouldn’t be there also dropdown with page templates to choose?

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    If you’re talking about the “parent page” dropdown, you need to first publish a post, then for the second post you’ll able to choose a parent.

    If you’re talking about the “page template” dropdown, you need to correctly define the PHP comment for your post type in the page-template.php

    Here is an example: (Documentation)

    
    <?php
    
    /*
    Template Name: My template
    Template Post Type: post, page, my-post-type
    */
    

    Then, the page template dropdown will be displayed in your post type πŸ™‚

    Thread Starter Damian P.

    (@damian-p)

    Ugh… now I see, I need add my CPT name to to top of the template file. It’s a pity, because I will not get rid of the total interference in the files. Thanks!

    I have one more question, I do not want to create new post in support so I ask here.

    I have group of custom fields. Now I want to display them on any PAGE and any POST (even if this is CPT). So in rules I choose Show this field group if > Post Type > is equal to > All or Page Template > is equal to > Default template. In that conf it’s works only for pages. How can I force those fields to show on every post and custom post?

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Yeah, that could be a feature to add to ACF Extended. An UI to manage all page templates and define them on the post type you want. I still need to think about how it would work.

    About your problem on the “Post Type == All” location rule. There was a bug that prevented the field group to actually show on all post types.

    I just pushed a new update: 0.6.7.2 hotfix. Update the plugin, and it should now work correctly πŸ™‚

    For your information: you don’t need to set the “OR Page Template == Default Template”, because the “Post Type == All” rule already match All posts for all post types.

    Thanks for the report!

    Regards.

    Thread Starter Damian P.

    (@damian-p)

    Thanks!

    Ok, now “Post type == All” works great!

    But: when I set post type == all or page template !== (Hero – home page) – “hero” is template for my home page, then fields still shows on home page and browser is freezing πŸ™‚

    So if post type – all are pages also, then when I exclude specific page template fields should not shows on that excluded template – am I right?

    BTW: in the future I will try to translate ACF Extended to Polish πŸ™‚

    • This reply was modified 4 years, 11 months ago by Damian P..
    • This reply was modified 4 years, 11 months ago by Damian P..
    • This reply was modified 4 years, 11 months ago by Damian P..
    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    I can’t seem to reproduce your problem :\

    Just to make sure we’re doing the same thing, are you sure you use the OR? Because it doesn’t seem to make sense, as “post type == all” already match all your posts.

    My test rule:

    
    Post type == All
    AND
    Page Template != My Template
    

    Here is my-template.php definition:

    
    /*
    Template Name: My template
    Template Post Type: post, page, my-post-type
    */
    

    One post of the post type my-post-type has the template My template.

    What we want to achieve: Render a field group on all posts for all post types, except when the post has the template = My template right?

    Thread Starter Damian P.

    (@damian-p)

    Ok, I will try explain it as best I can.

    I have group of fields. Those fields shows at all posts, so post type == all. In this configuration those fields shows also on my home page, because home page is PAGE, and post type == all contains pages also – am I right? My home page have templated called “hero”. So If I do not want to display thoes fields on my home page, I use post type !== “Hero”. And this not working.

    Video snapshot here. On the end you can see button group called “Rodzaj treΕ›ci” with “standardowa strona” and “bloki stron” and this should not be there. Besides WP is freezing and nothing I can do.

    https://www.dropbox.com/s/2cvr0lxexmld4pl/ACF.mov?dl=0

    So when I exclude specific Page Template, fields are still there.

    • This reply was modified 4 years, 11 months ago by Damian P..
    Thread Starter Damian P.

    (@damian-p)

    Right now I get what’s wrong and what you are telling me. In this case I should use post-types == all AND page template != hero, without “or”.

    >>>>> EDIT

    Ok, I thought it will resolve my problem – but no. When I use:

    post-types == all
    AND
    page template != hero

    fields are not showing anywhere, and should be everywhere but not in “Hero” template…

    • This reply was modified 4 years, 11 months ago by Damian P..
    • This reply was modified 4 years, 11 months ago by Damian P..
    • This reply was modified 4 years, 11 months ago by Damian P..
    • This reply was modified 4 years, 11 months ago by Damian P..
    • This reply was modified 4 years, 11 months ago by Damian P..
    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Okay, we have the same informations. It works for me (WP 5.2, ACF Pro 5.8, ACF Extended 0.6.7.2). Do you still have the infinite loop with the “AND” operator?

    Can you please provide the following informations from your website:

    • WordPress version
    • ACF Pro version
    • ACF Extended version
    • Are you using Gutenberg?
    • If not, what plugin do you use to disable Gutenberg? (ClassicEditor?)

    Can please install the following plugin: Query Monitor. It will provide you some nice informations in case of error or warnings in your administration. I think you’ll like this plugin πŸ™‚

    Once you give me those informations, I’ll test it.

    Thread Starter Damian P.

    (@damian-p)

    WP v. 5.2
    ACF Pro v. 5.8.0
    ACF Extended v. 0.6.7.2
    Gutenberg is disabled by Classic Editor v. 1.5

    take a look on vid:
    https://www.dropbox.com/s/wghgjzyo2yr0sko/ACF%20issue.mov?dl=0
    so… is this should work? or maybe it’s me doing something wrong? πŸ™

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thank you for the video, it is very helpful so I can understand what is going on. I’m doing some tests right now, but everything works for me so far. I see that you have many plugins, maybe there’s some incompatibility problem with them. I also see that the “inifinite loop” is gone since you’ve set “AND” instead of “OR”.

    I continue my tests and get back to you. In the meantime, can you please make a backup of your site, and try to deactivate others plugins, see if the problem persists?

    Thank you for your patience.

    Regards.

    Thread Starter Damian P.

    (@damian-p)

    Yesterday I did the same test on fresh WP instalation with updates, without plugins, nothing besides ACFs plugins:

    https://www.dropbox.com/s/9mbvbrzyxd92k4q/ACF%20issue%20test%202.mov?dl=0

    Maybe it’s a bug in ACF itself?

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello!

    Okay perfect, give me some time, we’ll find what’s going on!

    If you set OR “Page Template != Hero”, do you have the infinite loop your reported earlier?

    Thanks

    Thread Starter Damian P.

    (@damian-p)

    No, there is no infinite loop, but with OR β€œPage Template != Hero” test field is on hero template too.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Page attributes won’t show up in Post Types’ is closed to new replies.