• Resolved sparkscotland

    (@sparkscotland)


    With Pods Version 3.1.1 my Extended Post Type for Pages is stuck on Private and will not update to public. Let me know if there any logs I can send your way that would help trace this issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    This is expected for extended content types. The privacy is dependent on their config for public and publicly_queryable being set to true. If either of those are false, then it will show as Private.

    Since we don’t support overriding configs yet in Pods, we can’t change that on our side.

    What is controllable is the Allow Dynamic Features setting on the pod itself. The default handling is a sane “WP Default” which follows whether the post type or taxonomy is private.

    You can mark those pods on that screen as having Dynamic Features enabled anyways, or edit the pod and go to the Access Rights tab to make that change directly.

    chrissmyth

    (@chrissmyth)

    We had this same issue, that broke all our sites that were using Pods templates in Pages. After some mad scrambling around we found that this was because the WordPress default for ‘Page’ post-types is “publicly_queryable = false”. Pods requires it to be set to ‘true’. We were able to fix it by adding some code to our functions.php to change that default setting for the Page post-type (see below).

    It’s not great that the Pods plugin update broke lots of stuff due to being incompatible with a default setting in WordPress. If there’s a better way of fixing the issue than adding to the functions.php, it would be good to know.

    function fix_page_query() {
        if ( post_type_exists( 'page' ) ) {
            global $wp_post_types;
            $wp_post_types['page']->publicly_queryable = true;
        }
    }
    add_action( 'init', 'fix_page_query', 1 );
    • This reply was modified 1 year ago by chrissmyth.
    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    @chrissmyth Did the Allow Dynamic Features on the pod itself not do the trick for you? Just asking to see if we need to address a separate issue as well.

    Thread Starter sparkscotland

    (@sparkscotland)

    Thank you for this I was certain I had already tried setting Dynamic Features to Enabled but I must have failed to select the correct combination of options or somehow not saved my changes.

    chrissmyth

    (@chrissmyth)

    No it didn’t, unfortunately. The only thing that worked was manually adding the code to update the publicly_queryable value for Pages. Once we did that then the post-type changed to ‘public’ and it all worked.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Content Privacy stuck on Private for Extend Post Type Page’ is closed to new replies.