Forum Replies Created

  • Thank you so much John. This solved my problems. I had to add an action to remove those metaboxes and now it all is working great! Thanks!!

  • Yes, they do show up. I get to see the sidebar with WP metaboxes, and the ACF fields at the bottom of the page.

    EDIT: I should clarify, i don’t see the category/tag metaboxes, but I see the boxes for the custom taxonomies.

  • Hi John. Thanks for helping out with this.
    Yes, ‘load terms’ is enabled.
    It seems this is an issue related to the media edit page only. If I’m on the library page, and do a bulk edit, I can assign terms to media files and they are saved.

  • Thanks so much! I ended up using the CPT UI plugin in conjunction with ACF.

  • Has anyone figured out a solution to this problem? My client started experiencing the same situation all of a sudden and they are desperate because they cannot create any new content anymore without ACF fields showing up.

    They have WP 5.9.3 and ACF PRO 5.12.2

    Thank you!

  • Two things I forgot to write: Yes, ACF is not perfect, and, from what I’ve read, one pays a performance penalty for relying heavily on it.

    And when I have tried other CMSs, it’s been difficult to find one that has an interface that is as simple to use and elegant as ACF is.

  • BlakeHampson,

    You are right at naming those good points about Gutenberg.

    To me, this discussion boils down to what one wants to do with WordPress. If one is planning on creating a site with a scope that is similar to what one could do with SquareSpace or Wix, then Gutenberg is perfect.

    However, if one is planning on using WordPress as a CMS, managing a complex tree structure, with an intricate layout, where every bit of information must be available through WordPress queries from anywhere, in or outside the site, as discrete bits of information; and where, sometimes, one needs to import from an old site hundreds of pages, and precisely direct each old content type onto specific places in the backend (and the database), then Gutenburg is not your friend.

    It is not WordPress fault, nor Gutenberg’s. Many of us starting using WordPress for something it wasn’t built for. That’s how ACF came into the picture. It solves the need for a feature rich CMS.

    This debate has prompted me to look for WordPress alternatives. And in indeed, it is very difficult to find a CMS that is easy on the server, easy to update, with big community support, safe, user friendly, feature rich, longeve, and… that doesn’t cost an arm a leg on monthly fees.

  • This was very useful and pointed me in the right direction. I’m not an expert by any means, so forgive me If what I’m saying is mistaken. The code seems to have to small errors, that can go silently unreported and prevent admin pages from saving properly, at least that was my experience and it took me forever to realize what is going on.

    Below I’m pasting the amended code, with comments on what was missing or needs to be changed in case someone else, like me, needs to use this. Thanks so much anyways because this made a difference.

    add_action('acf/save_post', 'update_repeater_post_terms');
    function update_repeater_post_terms($post_id) {
      if (get_post_type($post_id) != 'YOUR POST TYPE HERE') {
      $terms = NULL; // this will clear terms if none found
      if (have_rows('YOUR REPEATER', $post_id)) {
        $terms = array();
        while (have_rows('YOUR REPEATER', $post_id)) {
          // SET THE ROW, WAS MISSING      
          // add this term to the array
          $terms[] = get_sub_field('YOUR SUB FIELD', false); // false for no formatting
      // DO NOT THINK THIS IS THE RIGHT WAY, set_objects_terms is a hook 
      // set_object_terms($post_id, $terms, 'YOUR TAXONOMY HERE', false);
      wp_set_object_terms($post_id, $terms, 'YOUR TAXONOMY HERE', false); 
  • John,
    Thanks for the clarification. I wish there was a warning too because it took me hours of trial and error. I thought I was doing something wrong, until I arrived here.

    I think the last line before closing your function should be
    wp_set_object_terms($post_id, $terms, 'YOUR TAXONOMY HERE', false);

    The other one you have (set_oject_terms) is the hook… but I’m not an expert on this.

    Thanks so much!

  • Thanks John. I appreciate your honest feedback.
    I have the same opinion. No matter how I look at it, I still cannot see the advantage of Gutenberg Blocks on larger sites. For small blogs or personal sites they might apply well; it gets WordPress closer to Squarespace or Wix.

    I watched a couple-years old video where Blocks were introduced. I did an honest attempt to share the enthusiasm of the speaker but I still find the direction unnecessary when using WP as a CMS.

    Another issue I found is that creating blocks is quite time consuming, and it might require extra plugins to speed up the process. It all seems quite backwards.

    Thank you!

  • I was having exactly the same problem. Things were working well until I introduced some filters to include in the search results matches by taxonomy terms. The filters I was using came from a 3rd party site. The code was the one below. On its own it works well and was helping with my search results (so if someone enters a tag name it will also return associated posts). But there’s something that caused conflicts with ACFPro.

    function atom_search_where($where){
      global $wpdb;
      if (is_search())
        $where .= "OR ( LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')";
      return $where;
    function atom_search_join($join){
      global $wpdb;
      if (is_search())
        $join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id";
      return $join;
    function atom_search_groupby($groupby){
      global $wpdb;
      // we need to group on post ID
      $groupby_id = "{$wpdb->posts}.ID";
      if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby;
      // groupby was empty, use ours
      if(!strlen(trim($groupby))) return $groupby_id;
      // wasn't empty, append ours
      return $groupby.", ".$groupby_id;
    add_filter('posts_join', 'atom_search_join');
    add_filter('posts_groupby', 'atom_search_groupby');
Viewing 11 posts - 1 through 11 (of 11 total)