Multi-site site nav, wpdb->prepare missing argument
$wpdb->prepare() is only necessary when trying to insert user input into a SQL query. If it’s a “static” SQL query, it’s not necessary.
$wpdb->prepare() is only necessary when trying to insert user input into a SQL query. If it’s a “static” SQL query, it’s not necessary.
you didn’t mention if you WANTED users to be communal and to be able to cross post. If you do want that, then multisite is what you’re after. If you don’t, then go by way of single site. You can still run multiple single site blogs off a single install by modifying the config file … Read more
If you want wordpress to behave nice when asked to serve content from example.com you need to configure it to know that. This is done automatically at the install process for the domain on which wordpress is installed on but can also be controlled from wp-config.php by setting values to the WP_HOME and WP_SITEURL constants. … Read more
When I move domains and have to change the domain in the database, I use interconnectit’s Search and Replace tool. Here is a very brief overview of the process. Export the database and upload it to the new server. Upload interconnectit’s Search and Replace tool to the new server. Configure what I want to be … Read more
In this case, I would suggest a server specifically for the database – a DB server. Server A & B could interact with it, and chances are, it would ease some of the tension and performance related issues with Server A.
The WP_DEFAULT_THEME constant actually just overrides what WordPress sets as default theme (which per default is the latest of the bundled themes). It does not really help you to define your parent theme. In fact you just have to “Network enable” your parent and child themes and then set the parent theme in the child … Read more
Your if case matches any user who is not both a super admin and test_user. For example, given a user test_user who is not superadmin, the result would be if (true || false) redirect Since one condition is true, the redirect would be triggered. Using the && operator, you’d get if (true && false) redirect. … Read more
I’ve run into this issue before when needing to import a large dataset into WordPress. The importers start failing. What I suggest is creating a custom PHP script that reads the values from the non-WP database and then inserts them into WordPress using the WordPress functions. This way, we ensure all the background data processing … Read more
For WP multisite these are the main site (ID=1) database tables: wp_commentmeta wp_comments wp_links wp_options wp_postmeta wp_posts wp_term_relationships wp_term_taxonomy wp_terms
Changing strings to null or to empty strings removes items from left menu of the uploader and corresponding tabs. Paste this code in functions.php: function remove_media_tab( $strings ) { if( !current_user_can( ‘administrator’ ) ) { $strings[“createGalleryTitle”] = “”; $strings[“setFeaturedImageTitle”] = “”; $strings[“insertFromUrlTitle”] = “”; $strings[‘createPlaylistTitle’] = “”; $strings[‘createVideoPlaylistTitle’] = “”; } return $strings; } add_filter( … Read more