Tag Info

New answers tagged

0

That's a server permission problem. According to the WP docs: Any file that needs write access from WordPress should be owned or group-owned by the user account used by the WordPress (which may be different than the server account). For example, you may have a user account that lets you FTP files back and forth to your server, but your server ...


0

you can solve this problem by enqueue the following script with the dependency of jQuery jQuery(document).ready(function(){ tinyMCEPreInit.dragDropUpload = false; }); To add the dependency you can refer this link I have tested this solution and it has worked for me. I hope it will work for you too.


0

From your question what i understood is u need to store media files to another custom location. if that is your doubt then this may help you.. In order to change the default media upload location, you need to edit the wp-config.php file. If you want upload directory to be wp-content/example then you will need to place the following code in wp-config.php ...


-3

update_post_meta($attach_id, '_wp_attachment_image_alt', 'Your alt text');


0

If you're referring to images that are inserted into the page or post content via the editor, you could hook into the 'the_content' filter, check if the visitor is anonymous or not via is_user_logged_in(), and use a regex to remove all img tags from the_content(). I'm mobile at the moment, but I'm happy to update this a little later with some example code.


0

Have you had a look at is_user_logged_in()? If you can explain how you're serving the photos I can perhaps suggest a way to authorize some images to be shown and the rest hidden to only logged in users.


0

Make sure to define( 'WP_DEBUG', FALSE ); in wp-config.php. For some reason it doesn't allow you to add featured images from a custom post type with Debugging on.


0

The action sends the $post_id just like you have so that's not the problem. Have you tried a var_dump of $_POST to make sure it's actually posting something other than null? Also, using the save_post action is going to be called every time a post is saved, so you probably need to use the save_post_{custom_post_type} action, replacing {custom_post_type} ...


0

Perhaps a bit late answer, but I had a similar scenario and wanted to share the solution. In functions.php of the theme (creating a plugin would work as well), I used the 'add_attachment' hook to create a new post (custom post type 'talk') based on each new uploaded file. Of course, the example could do with a bit of shining up, but this worked for parsing ...



Top 50 recent answers are included