Add field to post form

If you’re comfortable writing plugins, you can use “meta boxes” to add custom meta fields to the post form. Please have a look at the add_meta_box examples to see what I mean. The general idea is that you add a meta box containing a field, and save it to the meta table when the form … 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

Creating a search with tag variable also added for more detailed results

Add a new input to the form, the name is key, you can easily access query vars that match a paremeter supporter by WP_Query using the function get_query_var. For example, you could try to generate an URL like this: http://example.com/?s=test&tag=5-personas,4-personas And with get_query_var(tag), you get the values, and the you create a custom WP_Query using … Read more

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