Edit: You have an extra underscore in your table name, it becomes wp__posts in your case. Better use like how I have shown below 🙂
First, use table names like the following and try var_dump to see if it returns NULL. In case the Post ID doesn’t exist, $product will be NULL, which only var_dump can show.
$product = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = 4253");
var_dump( $product );
Related Posts:
- How can I trust switch_to_blog()?
- Sharing Dynamic Sidebars across Multisite Blogs
- latest 5 posts using switch_to_blog loop
- Switch_to_blog() outside wordpress
- why when I try to insert an image attachment along with a post does wp_get_attachment_url give me a very wrong file path?
- Upload images from one site to another in Multisite
- What is the way to share data between sites in a multisite
- get post id by $content (so by post content)
- Register submenu on network menu from the subsite
- Include Site 1 Posts in Query for Sub Sites
- Sort posts according to date
- Multisite switch to blog
- Best Practise: Linking to WPMU sites from other sites
- Display posts from one network site on another
- Get variable from previous blog while using switch_to_blog
- switch_to_blog($blog_id); still writing to main blog
- fatal Error undefined function switch_to_blog()
- How to get all pages on specific blog after switch_to_blog?
- Do “switch_to_blog()” and “restore_current_blog()” re-run the filters?
- Access from template info of another blog (in the same network)
- Get the excerpt by page ID from another blog in a wordpress multisite?
- Memory growth with new additions to WordPress Multisite
- Add additional Network constants to wp-config.php dynamically
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- I want to develop locally with Multisite, then migrate each site to separate remote WP installs
- WordPress Multisite – When a user signs-up on main site, how to add the user to a subsite
- create /blog subsite on WordPress multisite
- Post and Page Inheritance to subsites in a WordPress Network
- Roles other than Super admin accessing manage_network_themes
- Multisite in subfolder – How to make new sites to be in same level subfolders as the main site
- How to list all network sites on one page
- How would I compare and remove hacks to core?
- Memory needed to host 200 wordpress sites?
- How to manage hundreds of WordPress sites?
- Multisite – Retrieve the same theme option from all sites of the network
- At MultiSite Network Update “Can’t Resolve host”, override and continue updating
- Creating multiple blogs
- Multisite Login Issues
- Multisite Conditional (if blog_id?) in a page template?
- WPMU vs WordPress MultiSite is there a difference anymore?
- Multisite database upgrade SSL error
- Can I install a theme on only one site of a multi-site network install?
- Creating a Dev box from an existing production machine?
- Force Network Admin Dashboard to 1 column on wordpress multisite
- Can I run a second wordpress site as a subdomain without using multisite?
- Shared upload folder in wordpress multisite
- What are the differences in capabilities between the super-administrator and administrator?
- WordPress multisite with different domain
- Rewrite rules in multisite
- Emailing only the users of a MultiSites Sub-Sites
- wp_logout_url isn’t forwarding to correct link
- Multiple blogs, different domain names, one install to rule them all
- Delete options from all blogs on plugin uninstall from a network/multisite
- Clone a wordpress website with same functionality, but different content
- Can simple Admin save options in a Multisite?
- Is there a hook or a function for multisite blog deactivate or delete?
- How to remove nodes site wide from the toolbar on multisite install
- Stuck with WordPress Multisite Custom signup page without .htaccess modification
- wp-admin redirect loop with ssl
- wordpress multisite, https for whole site or just admin?
- Multisite network admin – URL / redirect error
- WPMU – new users are automatically subscribed to the main blog – how to prevent that?
- WordPress MU and nested sites addresses?
- Removing “Sub-menus” from My Sites Drop-down in Admin Bar
- Multi-site vs seperate installs for just 3 blogs?
- Installing WP twice in same Directory?
- wp_signon( $creds, false ); not working
- How deactivate the http-api
- MultiSite Move conjures duplicate URL
- How to query WP Multisite primary site link
- WordPress multisite in subdirectory, not root, and remove base folder from url
- No My Sites link after installing Multisite
- Speed up MU WordPress on Apache VPS?
- Buddypress on Multisite – Member List
- How do I use different URLs in a single WordPress installation?
- Create batch of sites WordPress MultiSite
- Call to undefined function wp_get_sites()
- Add additional non-rewrite .htaccess directives on multisites via mod_rewrite_rules filter
- Pushing stored procedure to a multisite database in WordPress
- Child Theme activates, but nothing from parent theme displays (MAMP, Multisite)
- How do you disable account activation in WPMU and then log the user in right away?
- Error uploading files bigger than 58 MB
- Can you install / activate the multisite when the install is in a subfolder?
- In multisite environment which is the most Popular blog?
- Share reusable blocks between network sites
- Multisite registration problem [closed]
- Some PDF files get Forbidden Access and other open normally on the same directory subsites
- WordPress rewrite multisite blog url
- How to transfer existing WordPress website to new multisite wordpress domain?
- Can Multisite run without domain name in WordPress?
- Copying media from multisite subsites to main website
- Link structure, WordPress IIS
- Going multisite with www prefix
- WordPress sub-domain multisite 505 error
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- WordPress Multisite blogs not working after domain swap
- Multisite, Subdomain, shared NFS directory Linux HELP
- How to create multisite roles with predefined themes
- Can I safely remove banned names from WordPress?
- Multisite install w/ Sub domains on a subdomain