How to wrap every image in a post with a div?

By default images already have unique class’s but this depends on your theme. Use firebug and hover over the images and you should see stuff like class=”aligncenter size-full wp-image-1525″. If you want to change the class or id or alter any attributes of the image you can use the get_image_tag filter. For example, add_filter(‘get_image_tag_class’,’my_custom_class’); function … Read more

Query only Posts from Both of Two Category?

Just guessing here, but I suspect that query_posts() is not appropriate in this situation. query_posts() should only be used to modify the main query, and the emerging best practice is that query_posts() shouldn’t be used at all, but, instead, replaced by filtering pre_get_posts. Having said all that, I would look into WP_Query and particularly the … Read more

Add a special filter link to All Posts in admin

First of all in your image you can see that WordPress lets you filter the posts by category, just bellow the what you have added to the image, But if you want to know how you can add your own link to the filter you can use the views_edit-post filter hook ex: add_action(‘pre_get_posts’, ‘query_add_filter’ ); … Read more

Get the object ID by URL

Try this function: url_to_postid( $url ); The WordPress codex is your friend. A quick Google search could have provided the answer.

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