File Uploader – Upload without adding to Media Library

HTML Okay, you’ll of course want to set up an HTML file. I would use this code or something like it: <form action=”upload.php” method=”post” enctype=”multipart/form-data”> Select image to upload: <input type=”file” name=”fileToUpload” id=”fileToUpload”> <input type=”submit” value=”Upload Image” name=”submit”> </form> Of course, you don’t have to use upload.php as your filename, that’s just what w3schools used. … Read more

Mowing site to another domain in simplest way

Unfortunately there’s nothing native in WordPress to handle searching and replacing your domain name across all your posts, options, etc. The closest you can get is WP-CLI’s search-replace command. It’s not an official WordPress project, but it has quite a high adoption rate, it’s very well maintained and available by default or on demand on … Read more

Plugin content is shown on every page

It’s a common mistake about the difference of WordPress’ Actions and Filters. Action is when you want something to happens besides the default. Filter is when you want something to happens instead the default. Knowing that, when you use an action, your output will be inserted in that action content. But when you use a … Read more

Search by Attachment ID

The WP_Query class can match IDs as well as search terms. An idea would be to use the pre_get_posts action to detect if the search term is numeric and, if it is, set the query to work with attachments while passing the search as the ID. function wpse223307_allow_search_by_attachment_id( $query ) { //Only alter the query … Read more

Override plugin template

It doesn’t work like that as native functionality, a plugin author has to build that themselves, and some have such as WooCommerce and Shortcodes Ultimate. If your plugin doesn’t have this functionality and the hooks available (if any) aren’t sufficient, you’ll need to fork the plugin.

What goes into wp_postmeta and why?

Like several other tables it is just matching a key to value, when is this specific case they key is composed of the post id number and a string. It is usually used to store additional information about the post that is not part of the content. In you case probably the place location or … Read more