How do I add Facebook OpenGraph meta tags for attachments in the header for a custom theme?

$attachment_id is simply the numerical ID assigned to any media you have uploaded. You can write: echo wp_get_attachment_image(‘1′,’large’); to display the large size of image attachment with ID of 1. You should setup a new query to get all of the attachment IDs associated with the current post, then you can get_posts(‘post_type=attachment’) Check this example … Read more

How can I remove the site URL from enqueued scripts and styles?

Similar to Wyck’s answer, but using str_replace instead of regex. script_loader_src and style_loader_src are the hooks you want. <?php add_filter( ‘script_loader_src’, ‘wpse47206_src’ ); add_filter( ‘style_loader_src’, ‘wpse47206_src’ ); function wpse47206_src( $url ) { if( is_admin() ) return $url; return str_replace( site_url(), ”, $url ); } You could also start the script/style URLs with a double slash … Read more

custom COOKIE on custom page

If all you are doing is setting a cookie on a page then why the complexity? Check this out for a simple answer http://www.w3schools.com/php/func_http_setcookie.asp My only thought is that you are then trying to redirect them back to WordPress and if so you may wish to check this Setting custom cookies in WordPress I’d say … Read more

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