Is there a plugin which allows me to save additional, invisible content per post?

I like this idea from wprecipes.com. It is a very lightweight solution. add_shortcode( ‘note’, ‘sc_note’ ); function sc_note( $atts, $content = null ) { if ( current_user_can( ‘publish_posts’ ) ) return ‘<div class=”note”>’.$content.'</div>’; return ”; } It allows you to use the [note]…[/note] shortcode to enter private comments.

How do i show wordpress attachments from current post?

Your code and description seem to refer to the previous/next attachment navigation. That code is intended to display previous/next attachment navigation, and that’s exactly what it’s doing. If you want to display all attachments: Within the Post Content, use the shortcode Programmatically, in the template file, use e.g. get_posts(), combined with e.g. wp_get_attachment_image(): <?php global … Read more

How to change image url?

Go into your WordPress Dashboard > Settings > Media and then untick the option that says Organize my folders into Month and Year based folders This will make it look like: http://example.com/wp-content/uploads/imagename.jpg Then to take it further you need to update you config.php file and add in either this line: define( ‘UPLOADS’, ‘image/’.’files’ ); This … Read more

Is there a way to get attachment data?

Don’t forget that attachments are just posts (though they are native posts and those tend to be a special case). Thus simply get_post() on attachment ID should get you typical post object for it. 🙂 Similarly all API functions that work on posts should work on attachments.

Easy way to delete 70k posts and attached media?

If you know how to find the posts, then we can use WP CLI to do a 2 step process. First, grab all the post IDs in those categories using wp post list E.g. posts=$(wp post list –field=”ID” –category__in=”1,2,etc”) wp post delete $posts –force Then we can plug the values in posts into wp post … Read more

page template for attachement page?

WordPress supports several types of attachment templates. The function get_attachment_template in wp-includes/theme.php provides this support; it is called in wp-includes/template-redirect.php. If your theme includes attachment.php all of your attachments will be rendered with that template. If your theme also includes image.php then all of your images will use that template as long as they have … Read more

Why can I not view image attachment pages?

From what you’ve described, it sounds like the theme doesn’t have an attachment.php template to handling displaying the actual attachment page. You check on the attachment page, by going to Appearance->Editor, and checking for an attachment.php; however, I believe that answer is incorrect. WordPress should default to displaying the image on the normal blog index … Read more

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