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?
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- WordPress Infinite Scroll without using any plugin
- Date archives for custom post type
- How to remove a metabox from menu editor page?
- How to add active class to custom menu using while loop and wp_list_pages
- Append taxonomy terms as class names in markup?
- New Plugin Review
- Problems with function on function.php
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to add SVG icon above product tab title
- GravityForm: Populate Dropdown with custom post type [closed]
- Remove query string specific key value
- is_page “range” for if statement?
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- jQuery not defined
- Converting HTML Template to WordPress Theme
- WordPress add post format support not working
- Prev/Next child navigation for current page modifications?
- I need to add endpoint for wordpress categories
- Adding rel tag to all external links
- How can I apply_filters from inside a function?
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Populate editor with some content of a page with a page template
- Hide a widget inside a div on specific type of post
- I want to load in a new class but only if the current page is single-movies.php
- Skt full width basic slideshow problem
- php syntax : [ && ] between commands [closed]
- Which PHP page is the Default Posts Page
- Need to put a script above tag in header.php – WP 5.7.1
- How to create an ACF shortcode with Repeater Field in WordPress? [duplicate]
- How to show/hide php table rows based on the content of custom fields
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Prev/Next Links Broken on Static Front Page Pagination
- Isotope Drop Down Categories Filter Function
- What is the best way to define constant options for a theme?
- How exclude or skip post type with get_next_post_link
- How to add no follow to specific links?
- Create short URL with auto 301 redirect
- Function for simple math doesn’t work what am I doing wrong? [closed]
- How do i wrap woocomerce attribute in list?
- Removing files programmatically
- get_page_templates only return templates with “home” in the filename
- Class property seems to lose scope, attached to save_post action?
- Nav-Menu not showing up
- Show different website layout if no sidebar added
- get_template_part function and add images
- Need advice on theme customizer and child themes
- How to make sure relative URL works when site is not on root domain?
- How to pass hook variable to function?
- exclude custom post type from running a function
- Migrating site, only header shows
- How to access all meta data for RSS feed?
- Why Is Number of views on wordpress single post wrong?
- Change Language Title Pagination on Subdomain non Multisite
- remove specificly the last tag in all posts
- Let current user know pending posts counts using wp_query
- How to check post meta isset or not empty during publish/save post?
- How to use Page link field with is_page()
- How to hide a child category and show his parent category
- add another variable to php function
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Gutenberg block don’t save rich text content
- Change lost password url to a mailto URL in WordPress
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Remove span tags from WooCommerce Downloads page
- Send POST request to Flask app from functions.php file
- 500 Error, Get custom field and returning it
- How to add typehints to function in functions.php when argument is an object?
- Remove generated category and tag class names from woocommerce product & blog listings markup
- is_user_logged_in() not working in homepage
- Custom Post type Ajax search results
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- str_replace not preserving whitespace
- Calling PHP function doesn’t work in index.php
- How to set up an auto delete post?
- Display a post based on its metabox selection
- Calling an custom field from theme option at the frontend
- apply_filters() function
- Calling the Next category link on an archive page – WordPress
- Using tag to output text in Genesis?
- Metabox Input Not saving
- Cross origin ajax request always returns 0 when calling get_current_user_id();
- echo php values in table – strange behaviour, not all values are shown
- Merging two excerpt functions to work with conditions
- wp wp_register_script function results type parameter missing
- How to insert the first letter in uppercase [closed]
- how to display custom taxonomies in front page
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)
- Create custom API endpoint to change custom header image
- Creating posts with php-script + csv
- Change WooCommerce Order status from frontend form submitted data
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- How to use multiple custom post types to archive as front page?
- Custom post type removing /page/2/ from URL when trying to access it
- How can we upload custom page files?
- wordpress media library description column