You must read custom field themeOps
first, update index option3
in array and then save/update whole array.
$kisiArray = get_post_meta( $post_id, 'themeOps' );
$kisiArray['option3'] = 'peach';
update_post_meta( $post_id, 'themeOps', $kisiArray );
Update (sort by custom field)
$args = array(
'post_type' => 'post',
'meta_key' => 'themeOps_option3',
'orderby' => 'meta_value_num',
'order' => 'ASC',
);
$query = new WP_Query( $args );
More examples you find in Codex
Related Posts:
- How to query serialized array by comparing greater than (>=)?
- JSON not valid after json_encode posts
- how to limit and display tag?
- Insert woocommerce products programmatically with featured image and gallery
- Add multiple tags to multiple posts
- Custom order for Mysql array
- how to get post order by post id wp_query?
- Querying another post category to match current post and display in loop
- Get latest post from categories
- Categories Listing and Highlighting current category item
- Save / Update meta data as multidimensional array
- Merge get_comments & get_posts into a single query
- WordPress text field in array problem
- Get the correct meta_value with get_post_meta
- I am not getting result from php function that is json encoded
- Get current user array with post string
- Sort Posts Alphabetically by Multiple Categories [duplicate]
- Why is $_POST Empty in Profile Edit Admin?
- Exclude a ‘portfolio’ custom category?
- posts_per_page – Repeats only first posts ‘post__in’ array
- How to create a cumulative posts and members count
- How to get Images included in Post
- Accessing the post content with WP_Query
- Create an “All Posts” or “Archives” Page with WordPress 3.0?
- Unattaching images from a post
- Is it possible to add a first and latest posts link?
- Setting post meta data to random value during post status transition / on publish
- Add link on the top menu of the post table?
- Get the object ID by URL
- Add a special filter link to All Posts in admin
- wp_list_categories link to first post of category instead of calling taxonomy template
- Alternate custom content in the loop
- Custom Post Status Posts viewable to the public
- Add an image box besides featured image?
- Use Cron to modify posts via sql
- Edit menu item title from edit page/post
- Don’t post or draft if post already exists
- posts_per_page doesnt work
- if I create ‘front-page.php’, then how do I link to post index?
- Archive Page for Custom Post Type is not Working
- Ajax posts filter by date, comments, top views, top likes
- Copying and pasting emoji in a wordpress post
- Static page does not show my posts
- Get latest posts from WordPress site without header, menu and sidebar
- How can I schedule a PAGE to go live at a future date/time?
- Counter of posts ever posted – even deleted ones
- How to delete all the content of a wordpress site without deleting the Post and pages?
- Most liked page not displaying posts
- WordPress’ ALL post count info on its dashboard does not match phpMyAdmin’s ALL post count!
- How can I replace WordPress standard process of editing posts with making WordPress use a custom page? [duplicate]
- Post’s “Read More” redirects to wrong post
- 404 on paginated blog pages
- How to hide html tags on revision comparison pages?
- Blog page pagination is not working after using the offset argument
- Display post x of y within category
- WordPress Automatic Filename Changer
- Redirect to another page using contact form 7? [closed]
- How to save meta checkbox WordPress
- Sidebar show posts by current category also in single post
- Category Redirects to homepage [closed]
- Displaying post excerpt using wpdb query
- How to display Changing post link for 24 hours in x category
- Upload attachment from external site
- Custom permalink for each post
- Related Posts: Changing Function For Posts Per Page
- Rand post related question
- load more posts by category
- Import custom database into wp and keep the post id
- Retrieve a specific post’s featured image and show on a different page
- How to split authors?
- WordPress wp_editor to post and edit
- How to display Post title By ID and its Thumb Contents
- Is there a way to define the $post var outside the loop?
- How do I keep raw HTML in my RSS feed and not lose my paragraph breaks?
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Blog Posts – Scroll to view more
- After updating to 5.9, when the posts page is loaded in the browser it uses wp-includes/template-canvas.php?
- Show only posts with titles/permalinks that do not contain certain words
- index.php not getting blog posts anymore
- Mysql update menu_order problem
- Put page on Archived statut after end of publication date
- Blog Post slider not working
- Display new posts categories in separated divs
- WordPress template next_prev
- Point to a page when there is no results
- Remove All in One Seo from Posts for Contributors
- Add row after three columns
- Show posts between two Custom Fields date
- How to display an icon when a new post is published and then remove it when a specific time past?
- Grab next post title in archive page
- How to store post rating system data post independent?
- Displaying different posts Via wp_list_categories()
- get_post_meta property of non object
- Which hooks are essential for post templates?
- Should new posts already have tags?
- WordPress posts [closed]
- Post UI Tabs plugin double fade effect
- Error 404 blog/page/2/
- WordPress limit post that subscriber can create
- Output number of WordPress posts remaining until a post milestone is reached