Turns out, Divi cannot handle associative arrays, in my case with post id as key and post title as value. Using an indexed array solves the problem. Unfortunately, this is not mentioned anywhere in the documentation.
Thus I changed the code in the get_post_options() function from
foreach ($posts as $post) {
$options[$post->ID] = $post->post_title;
}
to
$index = 1;
foreach ($posts as $post) {
$options[$index] = $post->post_title;
$index++;
}
Why this is the case, I can’t answer.
Related Posts:
- WordPress different custom tag being displayed in on tag list
- Can I associate a custom post type with another custom post type?
- Is it possible to go to the next post in the same category?
- Get category id for a custom category and display it in a class
- Merge / Combine two php functions for Previous and Next Link with Thumbnail
- How to have Function of a plugin using global vars into a shortcode?
- List sibling pages widget, exclude current page
- Ninja Forms – pull in some post related information
- Functions are causing errors
- Insert wordpress tags below posts via functions.php
- Why isn’t my custom function kicking in from my functions.php file?
- Admin-area broken through weird issues
- Postmeta not saving
- Display a query with multiple post types and same relationship on a single page
- Check if values exists DB
- Help with my first Metabox helper class
- Permission functions within wordpress
- Permission error on plugin save
- Removing all my hardcoded URLs with get_site_url()
- Calling the Next category link on an archive page – WordPress
- Adding ID to a Listing but not inside WP_Query while
- WordPress 2014 Theme – Featured Content with multiple tags?
- Get author meta of all writers
- Using tag to output text in Genesis?
- Overwriting a Shortcode
- adsense code showing on random post thumb
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Break a WordPress function to run in patches and re-continue
- str_replace not responding in functions.php [closed]
- How to get category pages to look like a certain archive page?
- Pagenav Not appearing on custom Template
- Shortcoding with Divs
- Display default WordPress login/registration form into a modal window
- Metabox Input Not saving
- Highlight main menu when on specific posts or pages
- WordPress display name string manipulation
- Search box background on a different page template
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- syntax error unexpected ‘}’ at 364 line
- get_post_meta no longer working
- Highlight posts currently being edited on multiple editor site?
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- WordPress adding in site URL to header links
- How can I clear the theme mod settings?
- Cant get theme to change footer color through theme customizer
- Adding code to the function file
- Conditional Content Display
- Password form redirection to belonging post
- Display a list of users with avatar filterable with alphabets
- Trouble using wordpress functions in a pop-up modal form
- admin-ajax.php loading many times
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Custom Loop for custom post type. Compare by meta_value?
- Showing all post from all post type in admin backstage
- How to extend the page editor?
- How to call a specific value within the functions.php file?
- Error on Include php:/usr/share/pear
- Fix My Custom Function: Remove Automatic
- Code in custom widget queries all posts, when it should only query the current post
- Change default comments form title [duplicate]
- 2 small questions: How to redirect to a created page & show that pages title in wp, bp
- Global variables and re-use
- Pull GET parameter from URL in functions.php
- Add HTML before a specific div?
- static array on functions.php
- Adding Gravity Form With if(is_page) Is Not Working
- Cross origin ajax request always returns 0 when calling get_current_user_id();
- Hide the content before the more tag in the “single page”
- echo php values in table – strange behaviour, not all values are shown
- Issues separating my Plugin pages into different files
- Merging two excerpt functions to work with conditions
- Pagination not displaying
- Replace TinyMCE with Custom Built Editor
- wp wp_register_script function results type parameter missing
- ajax form function error
- Display custom meta box in my template file
- How to get the rating value of each comment
- php “use” not working in template [closed]
- I am trying to replace a string with other from function.php
- Adding php within a return statement [closed]
- How to add margin underneath woocommerce total price amount -> productpages
- Send foreach $_post method to contact form 7 [closed]
- WP Debug enabled Undefined index error in a widget
- ACF Date fileds to Age Convert [closed]
- Displaying categories
- Whats wrong with my code? Need To add String to shortcode? [closed]
- How do I get Roboto Google Font to display normal font-style? [closed]
- Select area and checkbox data is not saving?
- My title is showing after the shortcode
- Load a Header in wordpress
- Trouble figuring out how to get my button to submit comment
- Link to external page has wordpress blog-url inside
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- How to modify this function to exclude also the post belonging to a specific category?
- AJAX: WordPress filters inside $html do not work as intended
- Integrating CSS Into a WP Function Call [closed]
- which table updated after logout?
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- Change background image based on tags