Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #979423

    Custom Post Type (Case Studies) – Advanced Layout Builder – Spinning Wheel of Death

    No plugins. Reinstalled WP & Enfold. Added debugging for WP and Enfold. Works on Pages, not on CPT. Any ideas?

    PHP Version Tried 7.1 & 7.2.5
    Memory Limit (memory_limit) 256M
    Maximum Execution Time (max_execution_time) 30
    Maximum File Upload Size (upload_max_filesize) 64M
    Maximum File Uploads (max_file_uploads) 20
    Maximum Post Size (post_max_size) 8M
    Maximum Input Variables (max_input_vars) 1000
    cURL Enabled Yes (version 7.54.0)
    OpenSSL OpenSSL 1.0.2k-fips 26 Jan 2017 (268443839)
    Mcrypt Enabled No
    Mbstring Enabled Yes
    Loaded Extensions Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, posix, bcmath, imagick, imap, inotify, intl, PDO, dom, xmlreader, soap, xmlrpc, json, xmlwriter, pdo_mysql, fileinfo, gd, exif, zip, pdo_sqlite, mysqli, mysqlnd, Phar

    #979431
    #979433

    Yes, I have this in my child functions.php. The Builder appears, I can add content, but when I save I get the spinny wheel. And the content does not display on the front-end.

    /* Add Advanced Layout Builder to Case Studies */
    add_filter(‘avf_builder_boxes’, ‘add_builder_to_posttype’);

    function add_builder_to_posttype($metabox)
    {
    foreach($metabox as &$meta)
    {
    if($meta[‘id’] == ‘avia_builder’ || $meta[‘id’] == ‘layout’)
    {
    $meta[‘page’][] = ‘Case Study’; /*instead add the name of the custom post type here*/
    }
    }

    return $metabox;
    }

    #979437

    Hi,

    I changed the code to following one

    /* Add Advanced Layout Builder to Case Studies */
    add_filter('avf_builder_boxes', 'add_builder_to_posttype');
    
    function add_builder_to_posttype($metabox)
    {
      foreach($metabox as &$meta)
      {
        if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout')
        {
          $meta['page'][] = 'casestudy'; /*instead add the name of the custom post type here*/
        }
      }
      
    
      return $metabox;
    }

    Please review your website :)

    Best regards,
    Yigit

    #979446

    Huzzah! I had tried both “case-study” and “Case Study”, and when the latter *sorta* worked, I didn’t think to try “casestudy.” You’re the master!

    #979448

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Custom Post Type – Advanced Layout Builder – Spinning Wheel of Death’ is closed to new replies.