Always generate thumbnail after sideloading image

You’ll have to use wp_generate_attachment_metadata and wp_update_attachment_metadata to do this. // sideload it into wordpress (generates various sizes) $thumbid = media_handle_sideload( $file_array, $post->ID ); if ( is_wp_error($thumbid) ) { // deal with error here } // If this function is undefined in the environment where it is to be used, // such as within a … Read more

WP installed is asking to install if typed domain.com

Adding this lines to .htacces solved the redirect problem to wp-admin/install.php if typed the domain.com without the www even if the WP was completely installed and settings configured properly. RewriteCond %{HTTP_HOST} ^www.domain.com/rus [NC] RewriteRule ^$ /index.php [NC,L] Now I can continue with rusian translation. The main problem was a defective plugin, which was blocking the … Read more

Designing a member area on my site

If you never heard of WordPress, you can have an overview at the Codex in Getting Started with WordPress and explore the topics as the need arrives. G.M’s linked Answer has very nice information for your use-case, and sample code with advanced techniques. Worth bookmarking. To get really started, learn how to make a Child … Read more

bbPress – Post count increases after every edit

This is not related to bbPress 2.4, bbPress 2.x at this stage does not include this functionality out of the box. I expect you are using an additional plugin to add the ‘Post count: 1’ functionality to bbPress and your issues relate to that plugin.

Copy url from post_content to custom field

What you need to do is run a function that gets triggered when the “update” button is clicked on posts. I can’t guarantee that my attempt to isolate the shortcode was successful, ( I’m not too good at that stuff ), but you definitely get the idea here! add_action(‘save_post’, ‘save_details’); function save_details() { global $post; … Read more