New answers tagged


You can use what you have with slight modification. Just increase the height of the meta box and let your users enter an item on each line. Embed $recipe_embed = get_post_meta( $post->ID, "recipe_embed", true ); if ( ! empty( $recipe_embed ) ): ?> <div style="background: green;"> <?php // normalize returns $...


What you're getting is an array so you need to implode() them - the Walker_Nav_Menu has something like this: $class_names = esc_attr( implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ) ); So you can modify your foreach to implode them in a similar fashion $class = esc_attr( implode( ' ', apply_filters( '...


This $_GET['variable'] is an array, as per your URL query string ?variable[]=value1&variable[]=value2, $_GET['variable'][0] and $_GET['variable'][1] should return those 2 key values Edit - after the discussion - making it dynamic $meta_query = array(); if ( ! empty( $_GET["variable"] ) ) { if ( is_array( $_GET["variable"] ) ) { $meta_query['...


Newlines are not valid inside json strings. However you are outputting this code or otherwise checking it for sanity is somehow adding newlines into your long strings here. Check that your strings really are all one line and not broken up into multiple lines.

Top 50 recent answers are included