Lightbox on wordpress post page

Before anything… to get a good answer, you need to provide a good question. Code examples would help a lot. You can use jQuery to accomplish what you need. Suppose your checkboxes are in a list. You can assign an ID to the list UL. You can use jQuery to run through every element in … Read more

Screen Options JavaScript Code

This is in wp-admin/js/common.js or wp-admin/js/common.min.js: // Scroll into view when focused $(‘#contextual-help-link, #show-settings-link’).on( ‘focus.scroll-into-view’, function(e){ if ( e.target.scrollIntoView ) e.target.scrollIntoView(false); }); Found with a search for show-settings-link in the complete source. 🙂

Fix Admin Dashboard Posts tab

You can control columns in most admin panels by clicking Screen Options at upper right of the screen and (un)checking them as you want. This is however saved individually for user and to get rid of column for all users would involve writing code to hook into internals and unregister it.

List latest posts with least comments in WP-Admin

I managed to figure it out. So, get_posts() uses WP_Query() and we can use the example in the documentation to filter the dates. Now for the comments, that is easy, we just add the parameter ‘orderby’=>’comment_count’. Also to note, when filtering get_posts(), we will need to disable suppress_filters. Let’s filter the time first: function filter_where( … Read more

Phpmyadmin – post editing

Mysql allows you to run queries that apply to all post, see example : UPDATE wp_posts SET POST_CONTENT = replace(POST_CONTENT, ‘<a href=”http://mysite.com/my_link”>mylink</a>’, ”); This code allows you to delete <a href=”http://mysite.com/my_link”>mylink</a>on all posts. But in your case I doubt all links are the same so you need a pattern. Perhaps it can be done with … Read more

User Profile Avatars

You need to add a custom column to the user list screen like so: // Add a custom user column called Photo with a column key of user_photo // and re-arrange the columns array so our new column appears first. function add_user_columns( $defaults ) { $new_order = array(); foreach ( $defaults as $key => $title … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)