Don’t show avatars in media library

Like most page loads in WordPress, WP_Query is intimately involved meaning pre_get_posts is your friend. Proof of concept: function step_2($qry) { $qry->set(‘post__not_in’,array(468,303)); } function step_1() { add_action(‘pre_get_posts’,’step_2′); } add_action(‘load-upload.php’,’step_1′); I’m using the load-upload.php hook to isolate the filter to the “Library” page. If you’ve changed the uploads folder for your avatars you’ve already got some … Read more

wordpress images not showing properly

I would check the upload_path upload_url_path under your admin options. I suspect they are still referencing the other website. Go to https://yourdomain.com/wp-admin/options.php and scroll down till you get to the the upload_path and upload_url_path.

Change author, disable comments, enable trackbacks for all items in library

You have to run SQL query to do this. Put this code into your functions.php once, run your website and then delete it. global $wpdb; $author = 1; $comment_status=”closed”; $ping_status=”open”; $query = sprintf( ‘UPDATE %sposts SET `author` = %d, `comment_status` = %s, `ping_status` = %s’, $wpdb->prefix, $author, $comment_status, $ping_status ); $wpdb->query($query); Or run it directly … Read more

Building a Article Library within WP?

This could be achieved with custom fields or a custom table in the wpdb. Using ACF (Advanced Custom fields) you could assign a checkbox, or some field to each article and you can allow logged in users to check out certain articles and not allow other users to view that article whilst it is “checked … Read more

Unable to declare AOS library in functions

The function get_template_directory_uri() returns the path without trailing slash. So you need to write wp_register_script( ‘aosjs’, get_template_directory_uri() . ‘/js/aos.js’,…) Note the slash before “https://wordpress.stackexchange.com/questions/328563/js/aos.js”. What good for is this line, the script file should already be loaded: <script src=”https://wordpress.stackexchange.com/questions/328563/js/aos.js”></script>

Images missing from the media folder

This should usually be a comment but I don’t have enough reputation yet to comment. Your question is a little confusing which is why I am having problems trying to answer it. Are you talking about the WordPress media library or folder? One of them you can reach from inside the dashboard (under Media), the … Read more