wp_get_attachment_url not working

Add the PDF attachment ID as a custom field value, for example attached_pdf_id. Get the URL using wp_get_attachment_url(): <?php if ( is_user_logged_in() ) { $pdf_link = wp_get_attachment_url( get_post_meta( get_the_ID(), ‘attached_pdf_id’, true ) ); if ( $pdf_link ) { ?><a href = “https://wordpress.stackexchange.com/questions/89809/<?php echo $pdf_link ?>” >Download</a><?php } else { ?>Sorry, no link available. Please contact … Read more

Disable Link to Post from Showing Up in Post’s Comments?

It sounds like you’re talking about a pingback. You can disable it from Admin|Settings|Discussion. Uncheck Attempt to notify any blogs linked to from the article. Or, you can do it on a post-by-post basis under “Discussion” below the post you’re creating/editing. You might need to enable “Discussion” in the “Screen Options” menu at the top … Read more

insert link in wordpress editor greyout whole screen?

Looks like you need to update jQuery. You are running /*! jQuery v1.8.3 jquery.com | jquery.org/license */ and a very quick search of the error message text lead to this, posted five months ago– https://github.com/blueimp/jQuery-File-Upload/issues/1794–, and to the simple instructions “You need to upgrade to jquery-ui 1.9”. I would suggest updating your install as a … Read more

How do I add php to all links automatically?

Inserting PHP is not really the way you want to do this. You would then need additional code to execute the PHP in the post body. It could be complicated. Replace the links using a filter on the_content. Something like this: function replace_urls_wpse_91463($matches) { $ret=”<a”; if (isset($matches[1])) { $ret .= $matches[1]; } if (isset($matches[2])) { … Read more

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