I figured it out after adding the same code to a different site I run. It was working fine on that site with the same theme and mostly the same plugins. I narrowed it down to another function I made (thankfully it wasn’t another plugin). The other function was sorting something on the front end, so all I had to do was add if (!is_admin())
to that function. So the moral of the story is, I screwed up in a completely different area. 🙁
Related Posts:
- How to update custom fields using the wp_insert_post() function?
- Make custom field meta not display if there is not data in it
- Sort posts by custom fields value using dropdown menu
- Sort the result of the main Query in shop page by a custom taxonomy
- How can I add extra word in permalink when someone click download button?
- Which PHP page is the Default Posts Page
- WP_Query: getting posts where custom field exists
- Modify main query before it run without pre_get_post
- Unable to render custom field after attempt to generate a list of recent post in page template
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- WordPress sorting posts by date and title using a dropdown
- Query on a repeater date (acf)
- When working with a post, almost all wp_postmeta are deleted
- Query category-specific, paginated posts and allow viewer to change sort order
- Query posts by custom fields (object post)
- Remove posts after a given amount of time
- Automatically add custom CSS to new posts using a category template
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- How Display Posts on category
- Hide wordpress field if data is empty in post!
- Importing hard coded custom field into acf field
- How can I use wp_query to show all product data using just the products ID?
- Query all posts of a custom taxonomy term
- Retrieving Author ID in wp-admin area
- tracking number field in Woocommerce order [closed]
- Getting a specific post values to another div or modal
- Trying to add attribute to my posts’ featured image
- Nesting if statements to echo only one string based on what tag was filtered?
- Displaying the last post on static homepage
- How can I create a list of page titles from custom meta values?
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- Passing the custom field values in the wp_get_current_user array function
- Best practice for migration friendly images in posts/pages?
- How to show part of the_content?
- Custom profile field with birthday. Troubles with
- How to Sort posts by Vote Count?
- Sort query_posts for Parent Pages to menue order or the count?
- How to sort posts based on the value (number) of a post’s metadata?
- WordPress – Display array data of a child
- Unreadable pagination
- 200 Rewrite blog post links
- How to set a min number of words for a blog post
- How to use $query->set with post__in?
- Loop through categories and display posts title under each dropdown
- Get post id in a function when edit/add a post
- wordpress allow user to edit user profile with custom fields
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- how do I get a specific post from a post with a subcategory in WP
- Sort custom meta column by other meta value
- Automatically create child pages and grandchild pages when saving a (parent) page
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Need Help Fixing My Iframes [closed]
- Second transition_post_status hook fired instead of the first
- Firing schema via code in functions.php doesn’t work
- How to store post ID’s in cookie or session to display the same posts later
- Adding number to date not working [closed]
- Which hook/action will help me solve my problem?
- Tax query in pre_get_posts not working
- Saving and Restoring a Canvas on A Individual User Basis
- Seach custom post type posts only by meta fields?
- How to use thumbnail size of image if I’m only using src to get image
- Post + form + action + results on the same page
- Open post-content in archive page in a Modal box with bootstrap
- 3 Slashes appear after Apostrophe in custom fields after updating product-site
- how to retrieve a value if a checkbox is checked
- Trouble checking if custom woocommerce checkout field is empty or not
- Two queries for a WP_User_Query search work perfectly apart, but not together
- remove post that has no content
- auto-populating custom nav with all items from custom post type
- Sort meta-value in the sequence array in pre_get_post
- Loading index.php contents which located outside blog folder for post single page
- get post content of particular post by url
- Add / Update Custom Fields After Select Pictures in Media Window
- Post repeating with infinite scroll
- conditional logic for front-end custom field edits
- Custom posts in different columns style
- Get children post mime type using parent post_ID wp_post
- How to show only subcategories in parent category not parent category?
- Trying to retrieve post meta
- 404 error when I acess the second page of post-type
- Sort by page information by Ascending Numbers
- Automatic Shortcode Creation with Custom Fields [closed]
- Custom field values to taxonomy terms
- How would an if statement surrounding a custom field with two variables (holding values) look like?
- Redirect to another page using contact form 7? [closed]
- How to add specific meta tags to head of cart and checkout pages in woocommerce?
- Custom Field IF/ELSE PHP
- How to combine 2 php functions into one function with a custom field
- Remove the last X characters of a custom field value
- Advanced Custom Fields – display label and value only if value entered
- Is it possible to retrieve all posts with a certain value for metadata?
- retrieve post data and insert it in seperate static html page without WordPress
- Saving zero in meta box
- WP Insert Post and then go to post
- Non-Closing PHP Query in WordPress Loop
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Returning data instead of echoing/printing