Please add “;” after $i = $i++ and see if that fixes your issue
foreach ($socialIcons as $icon) {
$i = $i++;
$wp_customize->add_setting(
'pxk_href_' . $icon['name'], // use this in twig file call to theme_mod
array(
'default' => '',
'transport' => 'postMessage',
'priority' => $i
)
);
Related Posts:
- Looping through WP_Post Object
- Must Use Plugin Causing Query Error
- How can I add multiple ‘tax_query’ arrays via a loop?
- Checking array against author id in loop
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- How to get the last category name of a child category?
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Only show first image in foreach loop
- Get all posts as an array ID => Name
- in_array not working on dev server but works on localhost
- ACF – Get ID of relationship field in flexible content
- Show the subcategory name based on current product
- make an array in wordpress cusmization api?
- WP_Post is not from correct array
- What is This esc_html_e() i wordpress php?
- Sorting list of sites from multisite network using wp_get_sites
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- Dynamically change feature image in customiser
- How to update single value in multi dimensional Post Meta?
- Display only text to WordPress loop without loosing the text formatting
- Design view breaking on Pages
- get understrap pagination to work with custom query
- Passing array in add_option()
- Woocommerce – How to get products which have a sale between 20% to 40%? [closed]
- Displaying Only Certain Tags in Loop
- Way to display “Yesterday”, “Today”
- How can i display post loop in table format?
- multiple if statements [closed]
- How to select WooCommerce products by post_meta and order them
- Parsing php string in jquery [closed]
- have_posts() execution failure
- How does the ternary operator work in the wordpress loop post?
- Working with query_posts ( arrays and query strings)
- Getting array of customizer settings
- Change the CSS of the Customizer API
- How to properly loop through these external URLs to get them into the sitemap using this hook
- Call global variable array() in woocommerce child/template
- Populate dropdown with Child Pages based on Parent Page chosen
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- PHP Array Returning [object Object]. Tried existing answers results with no luck
- Customizer: active_callback and sanitize_callback incompatibility?
- How to set variable, pass it to a partial file and remove it after?
- how to refresh div on template part?
- Can’t find infinite loop cause
- Alter required message using comment form api
- Changing the_posts_navigation() html output
- WP_Query fails despite having 1 post
- Loop stopped working
- How to use if statement in an array? [closed]
- How to loop through all the attached images in a post, and get their url one by one
- How to array only one key from another array
- WordPress Customizer Default Image
- Store post content in a php variable and output them using for loop
- How to add div blocks after certain set of post
- How do I remove a category from a wordpress loop>
- Get categories names as an array to use it in theme settings
- Show recent posts starting at a specific number archive
- WordPress query undefined offset in loop
- Foreach loop inside an array_merge
- Issue with custom loop in Archive page
- Getting posts to exclude from array
- WP Query Leads to 502 Bad Gateway (Timeout Because Query Takes Too Long)
- home.php show blog posts as grid view
- how to make an array of post id’s in is_single
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- array_rand not working correctly?
- Get css class of menu item in custom menu structure
- Dynamically adding filters
- WordPress call post-ID in jquery
- How to extract information from a wp_query result?
- List all anchor links on a page
- Order users by random not working?
- update_user_meta as multiple value but with same meta key
- How can I show how much water got saved on this order (making use of the number of items bought) on a thank-you-page?
- Responsive loop with 3 columns inside row then 2 columns
- Allow user to choose header style
- Remove specific javascript when viewing page in Customizer?
- Remove item from post_meta array via AJAX
- Make sticky post with FacetWP
- ERR_TOO_MANY_REDIRECTS / To Force SSL Logins and SSL Admin Access
- Date of last blog update for specific authors only?
- PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "
- PHP for loop not working as intended
- Make customizer panel or section button
- How to use foreach and if statement within array of arrays?
- For each 3 posts, show a different post type
- How to find the function which is outputting Array
- How to have post count after each listed category
- How can I put a custom field as the link of a button shortcode?
- Transient Loop Not working as expected
- !in_array doesnt recognize category
- Custom Meta Box If Else Statement
- How to set if meta_value is lower < than other meta_value in a get_posts array?
- wp_head makes my custom page template not work in Customizer?
- Conditional in foreach loop is outputting content twice
- is there away to hide php code in wordpress not to show in PAGES
- PHP Use Declared array Variable inside already Declared Array
- Woocommerce linking variations
- Grabbing value of input field inside of array
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)