You don’t need to add single quotes before using $exclude. Literals are enclosed in quotes to show it’s a string, but since $exclude is already a string variable, you can pass it directly.
Remove $excluded, you don’t need it at all and just use
$ogpk_pickup_field_args = array (
'depth' => -1,
'class' => 'store-pickup form-row-wide',
'show_option_none' => __( 'Choisissez le point relais où retirer votre panier', 'organic-pickup' ),
'name' => 'store_pickup',
'hide_empty' => false,
// 'exclude' => '1074,1072,1059',
'exclude' => $exclude,
'post_type' => 'organic-pickup',
'value_field' => 'ID',
'suppress_filters' => true
);
Related Posts:
- How to use wp_nav_menu to create a select menu dropdown?
- how to get value of wp_dropdown_categories
- Drop down+sort blog posts date added/most popular
- How to create a WP_Query to search the Title or Tag?
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- How do I create a drop down menu in a widget?
- Filter a second dropdown list when a value is chosen in the first one
- Second select list values are not saved after clicking update
- Improving the Thesis built-in dropdown menu via javascript
- Replacing the NavWalker dropdown element
- Custom widget using get_categories select menu dropdown
- Select dropdown not showing selected value php
- Add submenu using the bootstrap wp_nav_menu
- Drop-down menu with wp_dropdown_pages
- Archive dropdown styling not applied
- Getting the dropdown menu to redirect to different pages?
- Display related products with custom output
- How to number the options in a wp_dropdown_pages() select?
- Selected attribute of Drop down list
- Ultimate Member callback function issue
- How can I add multiple ‘tax_query’ arrays via a loop?
- How to make drop down post title
- Filter Select results based on selection
- Filter table with dropdown
- Easiest way to add dropdown to a page
- How to pick the default selected value in wordpress dropdown?
- Get the selected option from drop down list
- Tax query in pre_get_posts not working
- how to save selected option in variable for rest api category filter
- Display parent and child taxonomies in separate drop down select fields
- wp_dropdown_pages auto submit
- Isotope Drop Down Categories Filter Function
- pages meta box – get_categories dropdown
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- Bootstrap drop down Navigation Menu in WordPress
- HTML dropdown setting not showing last saved value in the database
- Sorting dynamic select/dropdown for Contact Form 7 of Modern Tribe Events posts
- wp_dropdown_pages : choose post status to list in dropdown
- create drop down menu
- How to use wp_nav_menu to create custom dropdown menu?
- Save the value of a wp_dropdown_pages
- Custom Taxonomy Select Menu: Setting default option value?
- How to populate a dropdown menu with option selected?
- Link to subpages on the same page
- go to home page when i select default in select-box
- Using wp_dropdown_users and selected() function?
- working with result of wp_dropdown_pages()
- Help with a get_categories () drop down menu – I want it to show in heirachial form
- Hi need update in my terms for other taxonomy
- How to set value selected using select2 jquery plugin
- Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?
- Dropdown list control in a post
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- Dropdown category field inside repeatable metabox
- I’m having trouble with Related Product “tax_query” ‘terms’ value
- How to make a pagination with dropdown selection?
- Custom search for a custom post type in WordPress
- wp_dropdown_users array for param selected
- tax_query not working?
- top primary menu drop down categories not showing
- PHP drop down menu for my get_category child of
- dropdown with no submit
- Multiple Dropdown’s with Submit Button
- Create a drop down list within an active page not nav menu
- custom field meta-box with dropdown/autocomplete
- Page 2+ of taxonomy archives does not recognise sort-order from dropdown
- Save data of select list after clicking save
- wp_dropdown_categories – remove
- Dropdown Menu for Query_Posts
- Plugin use of ajax/jquery depending dropdown
- how to search through plugin in wordpress cimy-user-extra-fields?
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- PayPal button with drop down menu not working [closed]
- Open WordPress Page from selected option dropdown
- How to solve dropdown menu problem [closed]
- Contact form with dynamic dropdown and filter
- how to show selected options drop down menu values in attributes field in after saving post.php
- Dropdown Value from DB Entry
- Change PHP version on server using either .htaccess or php.ini
- PHP code is not being executed, but the code shows in the browser source code
- Adding “Remember Me” in custom login
- Using wp_send_json to return HTML
- Bypass .htaccess when using download_url
- Anyone can register via backend
- Preferred Method of debugging a wordpress SQL calls?
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- How to use my style.css file outside of wordpress subdomain?
- Apple push notification doesn’t work
- How to add an arrow to menu items has submenus
- wordpress JSONAPI introspector always limits number at 10?
- Non-Closing PHP Query in WordPress Loop
- What is the best way to define constant options for a theme?
- Switch from wp-cron to a server cron job
- get_template_part function and add images
- get_post_meta shortcode returns empty field
- How to change PHP variables with AJAX request in WordPress
- Creating a custom register form
- How do I routinely extract the thumbnail of the most recent post?
- Get month and day from a Date Picker custom field
- If I define a variable in header.php, how do I make it available to templates?