How to use an array of categories as a dropdown?

Try this, $categories_array = array(); $categories = get_categories(); foreach( $categories as $category ){ $categories_array[] = $category->term_id; } array( ‘param_name’ => ‘category_id’, ‘type’ => ‘dropdown’, ‘value’ => $categories_array, // here I’m stuck ‘heading’ => __(‘Category filter:’, ‘overmax’), ‘description’ => ”, ‘holder’ => ‘div’, ‘class’ => ” ),

Query all posts if multiple meta key don’t exist

global $wpdb; $excludeposts = “SELECT * FROM $wpdb->posts WHERE $wpdb->posts.post_status=”publish” AND meta_key NOT LIKE %aa_% ORDER BY post_date DESC “; $main_query = new WP_Query( array( ‘post__not_in’ => $excludeposts, ‘paged’ => $paged ) ); while ($main_query->have_posts()) : $main_query->the_post(); //Stuff… endwhile; //hope this helps

Custom order for Mysql array

At first glance, I would think your query isn’t correct. Are you echoing out the variables to make sure they are correct? If you are setting ‘post_per_page’ => 4 and you are getting 5 posts, then something seems a bit off. Where it is a number, I believe you can leave off the quotes around … Read more

How do I get link URLs from the WordPress links backend into an array?

I believe that you’re looking for the get_bookmarks() function, which returns an array of bookmark objects. You could then implement this into your code: <?php // Get RSS Feed(s) include_once(ABSPATH . WPINC . ‘/feed.php’); $bookmarks = get_bookmarks(); $rsslist = array(); foreach ( $bookmarks as $bm ) { if ( $bm->link_rss ) $rsslist[] = $bm->link_rss; } … Read more