Support

Account

Forum Replies Created

  • Do you have a lot of WYSIWYG fields on the page? If so, enabling the Delay initialization? option for those fields may help reduce the JavaScript overhead on the page.

  • I think the reason you can’t adjust the user edit page like you can the others in ACF is because that page is pretty much completely hard coded in, meaning there’s not really a way for ACF to tell it not to output those fields.

    That said, you can use a plugin/snippet like the one below to hide them yourself.

    
    <?php
    /**
     * Plugin Name: ACF User Edit Page Adjustments
     */
    
    /**
     * Remove the admin colour scheme picker
     */
    remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
    
    /**
     * Add CSS to the admin pages to adjust user-edit.php form
     */
    add_action( 'admin_head', 'remove_edit_profile_fields_css' );
    function remove_edit_profile_fields_css() {
    	echo '<style>
    	/** 
    	 * Remove Visual Editor Option
    	 */
        #profile-page .user-rich-editing-wrap {
        	display: none;
        }
        
        /** 
         * Remove Keyboard Shortcuts Option 
         */
        #profile-page .user-comment-shortcuts-wrap {
        	display: none;
        }
        
        /**
         * Remove Toolbar Option
         */
        #profile-page .user-admin-bar-front-wrap {
        	display: none;
        }
      	</style>';
    }
    
  • Cool, I’ve opened a ticket. Although it’s not an issue for me for now if others run into it at least they will know the problem!

  • Hi John,

    The issue is because there’s no way to pass a custom array of $args into the acf_get_posts() function from the acf_field_post_object::get_posts() method as there are no filters in this method and it’s being called by acf_field_post_object::render_field().

    That’s why the snippet in my original post suggests adding the three filters so this can be adjusted if we need to do so.

    The post status adjustment in acf/fields/post_object/query is to allow the AJAX search to search for that specific post status, otherwise again it uses any which will miss out my custom archived status. This section works perfectly, the issue comes when the field is then rendered on page load using acf_field_post_object::render_field() which comes back as blank.

Viewing 4 posts - 1 through 4 (of 4 total)