link header to homepage (for wp multisite)

A few issues- php tags are for interpolating between php/html, they can’t go within php statements. Also, the single quotes in bloginfo are closing your string, which is generating the error. Lastly, bloginfo will echo its value, which can’t go within an echo statement, you need to use get_bloginfo instead, or simpler, just use home_url(): … Read more

Surround uploaded image link with div

You can use a image_send_to_editor filter hook to achieve what you want. <?php add_filter( ‘image_send_to_editor’, ‘imagehtmlchange’, 10, 8); function imagehtmlchange($html, $id, $caption, $title, $align, $url, $size, $alt) { // your banny wrote – put your code here return $html; } ?>

Detect what page was linked-from

To encode the URLs on the source page, in this case ‘home’: function append_query_string( $url, $post, $leavename ) { if ( $post->post_type == ‘post’ ) { $url = add_query_arg( ‘source’, ‘home’, $url ); } return $url; } add_filter( ‘post_link’, ‘append_query_string’, 10, 3 ); This adds ?source=home to the end of post link URLs on the … Read more

Custom Link In WordPress Media “Attachment Details” Upload Screen

A hacky way to do it is to do a string replace on the tmpl-attachment-details template: // See wp_print_media_templates() in “wp-includes/media-template.php” function wpse157297_print_media_templates() { $my_link = ‘<a class=”my_link-attachment” href=”https://wordpress.stackexchange.com/questions/157297/my_link.php?url={{ data.url }}” target=”_blank”>’ . __( ‘My Link’ ) . ‘</a>’; $nonimage=”<# if ( “image” !== data.type && ! data.uploading ) { #>” . $my_link . ‘<# … Read more

Menu Structure with Links failure to update

Did you actually create a specific menu and link it to one position you defined in functions.php? Once you do not link it to a position, WordPress grabs all pages and puts it in a menu. You should go like this: 1.) You put something this in the functions.php of your theme in order to … Read more

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