Add hyperlinks in media description
Add hyperlinks in media description
Add hyperlinks in media description
Make first child link default instead of its parent
Logout link not working
How to Add A Rel Filter to All Links?
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
You might use $_SERVER[‘HTTP_REFERER’] but take in mind that is not always sent so check for its existence and think about a fallback!
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; } ?>
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
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
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