Loop through two different sets of custom fields

Your question literally doesn’t quite sound like “combining” loops, that’s usually different thing in WP terminology. Following it literally you already know the part that outputs artist name you want — the_field(‘artist_name’). What probably confuses it in first context is that it’s not really a normal WP loop. Note how that call doesn’t specify which … Read more

Is there a way to stop WP editor deleting

I would suggest a shortcode: function gcse_wpse_143459($atts,$content) { return ‘<gcse:searchbox-only></gcse:searchbox-only>’; } add_shortcode(‘gcse’,’gcse_wpse_143459′); Then use [gcse] instead of trying to paste in an oddball html-ish tag.

more tag in the $post->content when get_pages were used

You can use the WordPress function get_extended to fetch the different parts of a string (the part before and the part after the <!–more–> tag). get_extended returns an array with three keys, of which the keys main and extended are important: $arr[‘main’] contains the part before the more tag, and $arr[‘extended’] the part after the … Read more

Calling Specific Pages with wp query Part II

Two issues here The default page post type is page, not pages Your meta_query is wrong, it should be an array of an array, not just an array Your arguments should be $args = array( ‘post_type’ => ‘page’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 50, ‘meta_query’ => array( array( ‘key’ => ‘field_5505a81b83234’, // field key generated … Read more

Overview with latest edited posts and pages

You can use the $WPDB query to query the DB, an example would be: $editedposts = $wpdb->get_results( ” SELECT ID, post_title FROM $wpdb->posts WHERE post_modified = between DateAdd(DD,-7,GETDATE() ) and GETDATE() ” ); This lists all posts which have been edited in the last 7 days (not tested), you would do something similar to get … Read more

add_rewrite_rule: Issue converting path to url

The path should just start with wp-content because the generated rewrite rule (which would be added to your .htaccess) is relative to your WordPress installation directory: function addCheckoutRedirect() { add_rewrite_rule( ‘tradeIns’, // I intentionally removed the caret (^) ‘wp-content/plugins/pluginNake/templates/checkout.php’, ‘top’ ); } And here’s how your .htaccess file may look like after the addition of … Read more