Oh, I have got solution through a small research, I tried with the object $wpdb
and it worked 100% fine as it works in plugins. and the processes are the same as plugins.
Thanks to all who tried to answer my question.
Related Posts:
- SQL query for custom taxonomy slugs
- ajaxurl not defined on front end
- Is it mandatory to use $wpdb->prefix in custom tables
- Where to store PHP files created by plugin / themes
- How to post data to same page in wordpress
- Understanding WordPress functions’ naming conventions
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- How do I Make a Theme “plugin-ready”?
- How to Add a .js file Only in one specific Page Dynamically to Head
- Show a user their recently viewed posts
- Retrieving custom fields with $wpdb->get_results
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Add new user and add meta at once
- Custom user profile, registration, login page with theme
- How to Display Custom Post Type’s Gallery (images ) in Through WP_Query
- What is better way to use Bootstrap inside admin panel?
- How to use mysql IN statement with wpdb update method?
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- What’s the better way to add an inline script?
- Backslashes being stripped from CSS
- What for the tables ending with the meta used in database of wordpress?
- How to determine if the current file is loaded in a plugin or in a theme?
- Finding the paragraphs in content
- Is Dreamweaver CS5 a serious choice for theme/plugin development?
- What allows a template file from plugin to be copied in child theme and overridden?
- How to avoid loading same script twice?
- Can I individually style items in the backend widget list?
- WordPress security issue to output data from user input from theme option form
- Finding posts containing matching array elements in a meta field usign WP_Query
- Customizer: widget-synced triggers twice
- How to Create Custom HTML Tag on Editor in `Text(HTML)` mode
- Where to store the name of a custom table?
- include wp-blog-header not working on MAMP
- Change the ‘published on’ text?
- How to filter users list on user_status field with get_users()
- Can Page Templates be Applied to Archive and Post Templates?
- Issue regarding $wpdb->prepare()
- Is there some way to provide the user a list of existing content in a CPT
- Change the look and feel of admin pages
- How to access noticeOperations from withNotices
- how to search users by ajax live search
- How to get boolean value from register_meta properly?
- Adding custom end points, No error line
- What is the proper method of using global $post?
- How to export post meta with images in wordpress
- Password field is empty when using wp_signon();
- How to change title tag at page after loaded post?
- Strange Situation When Try To Retrieve Github Gist Using wp_remote_get
- WordPress custom taxonomy check box to dropdown
- Widget HTML Display Problem
- How to create a backend for a custom theme?
- wp_nonce_field displaying twice
- WP Plugin Running before jQuery
- my own SVN for a plugin/theme
- Why enqueue styles on hook?
- Getting a WordPress Debug Strategy
- Proper way to use useSelect
- Conditional Generation of Image Sizes using add_image_size
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- modify show UI of a registered taxonomy
- Using function from enqueued .js file in theme in plugin?
- Does WordPress default CSS have Grids?
- Using HTML links within translatable string
- How to resize WordPress images on upload to specific height and width without cropping it
- How to avoid conflicts with db.php / $wpdb and other plugins that decide to use them?
- Plugin to create Posts and Forums then choose category and parent forum
- WordPress Page Reload Takes forever during theme development
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Anyone using unzip_file successfully? It uploads the zip but doesn’t extract it!
- Pass custom props to
- Include external po file for 3th party plugin to theme
- How to make premium plugin? I want to limit it until verification
- How do I add filter with woocommerce categories?
- Can’t upload image via submitting custom post from frontend
- Need Help to make a logic for editing posts in Frontend
- WordPress Query doesn’t return the correct value
- redirect_to how to make it simply work with get parameter or similar?
- Determine if the current page, is being edited
- Can i prevent the effect of the_title filter on the dashboard’s posts/pages titles?
- How to embed or integrated a custom WordPress Widget into the theme?
- How to implement pagination into a wpdb->result query?
- Woocommerce Custom Checkout
- Looping single post in a theme
- WordPress permalink setting
- Custom theme and plugin updating
- variable created in page.php is null inside of header.php
- Adding class to the parent of current-post-ancestor / current-menu-parent / current-post-parent
- problem with blank page
- grouping my widgets wordpress
- WordPress plugin tables become corrupt
- Create and style menu
- Nothing happens on WordPress Update command
- If I want to create new taxonomies (e.g. Project / Documents / Etc…) is it better to create them in the theme’s functions.php or within a plugin? [duplicate]
- How to add something after a function
- Fixing plugin for wpdb::prepare
- Problem with Poedit [closed]
- Is Explicit Versioning a better alternative to Semantic Versioning for wordpress?
- how many rupee or dollar charge to client to make theme [closed]
- How to create A – Z List with pictures?
- multiple record insert creating many duplicate records