I figured it out. I moved the reference to WP Alchemy within a function that fires after init. Everything now works great and I can use WP_Query within the setup files.
Here’s a code reference:
// WP Alchemy Setup
function jd_setup_wp_alchemy() {
include_once WPMU_PLUGIN_DIR . '/jonathanwold/metaboxes/setup.php';
include_once WPMU_PLUGIN_DIR . '/jonathanwold/metaboxes/cpt-spec.php';
}
add_action('init', 'jd_setup_wp_alchemy');
Related Posts:
- WordPress get_posts function, 1300 lines long
- Exclude a category if post is only in that category using wp_Query
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Use of caller_ get_ posts
- Tax_query terms ID’s using variable
- Initiating WP_Query() with no args and adding them later through the query() method
- Pagination custom query
- WP_Query and name__in
- Order posts by tags count?
- Querying Multiple Custom Taxonomy Terms
- WP Query with offset breaks wp_pagenavi or any pagination
- Show list of authors with latest post NOT older than a month
- Unable to combine “search value” and “tax_query” using WP_Query
- How to extend tag and category “Related Posts” query to custom post_type if the first 2 terms have no posts
- WP_Query search for whole words
- WP_QUERY returns empty set when fired from a WP-CRON scheduled event
- Interupting the loop with extra divs to display data, and how to get it to work responsively
- WP_Query, tax_query and term_meta: How to?
- Custom category search box for WordPress
- How to pass many ids in post__in?
- Sub-loop / nested loops Best Practices
- How to echo data after a WP_Query
- Query all published post AND attachment with specific mime type
- WP_Query returns random number of posts
- How do I run through a WordPress loop called from a filter function?
- Get and Trim Full Post Content in WP Query
- How to Union two different conditions in one WP_Query
- Display filtered results into custom page
- WooCommerce – get product sub categories
- Order by empty custom field
- WP_Delete_user link creation
- How to exclude post formats from wordpress recent posts in a tabs widget [closed]
- New WP_Query loop in admin causes problems
- How to sort a custom wordpress query by combination of meta values?
- wp_query sort with meta_value_num is not working
- How to pass orderby params to $wpdb->prepare()?
- Get author if post has multiple authors
- how update data through ajax and jquery
- What happens to the default query when I use WP_Query?
- WP_Query arguments relation shows AND instead of OR
- Combine results of multiple WP_Query to resemble single WP_Query
- Modifing archive query affects show post count function
- Using WP_Query() in Magento shows error
- For what queries is conditional tags informative?
- Utilising an existing page while using the “s” query parameter
- posts archive page – closing WP_Query loop correctly [closed]
- AJAX Breaking Offset Argument In WP Query
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Excluding posts with certain value of meta_key keeping posts without that meta_key
- Pagination in html table is not working
- Nested array issue in meta_query
- Function using get_posts() with tax_query not working when called from functions.php
- Why does WP_Query have methods that return public properties of the same name
- Query by key or author
- Search for pages with permalink
- Don’t repeat posts from children in parent taxonomy query
- WP_query paged pagination with excluded category still counts it
- meta_query with array as value with multiple arrays
- Why doesn’t my WP Meta Query return any results?
- wp-query problem with author
- How to make the ‘request’ filter work?
- Filter for each loop when WP_Query has no posts to show
- Custom WP Query order function possible?
- How sort products by calculate value? ( custom post meta, price, option)
- wc_get_products() return empty object
- Pagination unique to a widget
- Ascending numerical sorting with non-numerical characters last
- WP_Query not returning custom post type
- How do I use $wp_query->current_post with get_template_part? I’m trying to add post classes (first/last/even/odd) to custom loops
- Why pagination is not working with tax_query param?
- Finding post ID dynamically on click
- paginate_links method doesn’t show second page of my custom wp_query
- ACF Post Object meta-query by title not ID
- Case insensitive ORDERBY in wpquery
- Sorting with meta_query and multiple, optional meta keys
- getting posts by tags
- WP_Query & Duplicate entries
- Query child posts with tax query on parents
- From admin edit user page query either the user_nicename or username field value of the user profile being edited or viewed
- custom search form, posts_per_page value being ignored
- Fetching $_POST from Page Template into functions.php
- Include post_status check within $wpdb query
- Return on a quest all these meta_value
- Inline Ajax call after term is appended with a @ or # etc. displayed in div
- Complicated WP_Query
- Passing conditional arrays to WP_Query() [closed]
- Query custom post type by date field only working when two posts match the query
- Why isn’t my Meta_Query running?
- Custom query to show posts
- How to specify a certain amount of images queried, not all?
- wordpress sorting using array merge by price in ascending order but price with 0 must be show last
- Carousel Loop only duplicating
- Taxonomy related query not working
- How to show featured post first, then separate loop for other posts
- error with $query->have_posts()
- Multiple Orderby is not working right
- Refresh wp_query with no changes
- SQL query into to WP query
- WordPress WP_Query Search (‘s’) With Multiple Search Terms
- I want to place a post before all others from an ACF boleen field