Add to the functions.php file:
add_action('admin_head', 'my_custom_fonts'); function my_custom_fonts() { echo '<style> body, td, textarea, input, select { font-family: "Lucida Grande"; font-size: 12px; } </style>'; }
Add to the functions.php file:
add_action('admin_head', 'my_custom_fonts'); function my_custom_fonts() { echo '<style> body, td, textarea, input, select { font-family: "Lucida Grande"; font-size: 12px; } </style>'; }
For your functions.php file or a functionality plugin:
function cc_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'cc_mime_types');
Without this, SVG files will be rejected when attempting to upload them through the media uploader.
Before WordPress 4.0, you also make them display properly in the Media grid. But that’s broken now. If anyone knows how to fix, let me know!
function fix_svg_thumb_display() { echo ' td.media-icon img[src$=".svg"], img[src$=".svg"].attachment-post-thumbnail { width: 100% !important; height: auto !important; } '; } add_action('admin_head', 'fix_svg_thumb_display');
<?php if (current_user_can("manage_options")) : ?> <a href="<?php echo bloginfo("siteurl") ?>/wp-admin/">Admin</a> <?php endif; ?>
If a user is logged in and they are an Admin of the site (not just an subscriber or author), then display a link to get them to the WordPress Admin area. Otherwise, display nothing.
More specific than the regular log in / log out function, which will show for everyone:
<?php wp_loginout(); ?>
User profiles in WordPress have these fields for Contact Info by default: E-mail, Website, AIM, Yahoo IM, Jabber / Google Talk. You can remove those and add new ones as you wish, like in this example code for your functions.php file in your theme:
function new_contactmethods( $contactmethods ) { $contactmethods['twitter'] = 'Twitter'; // Add Twitter $contactmethods['facebook'] = 'Facebook'; // Add Facebook unset($contactmethods['yim']); // Remove YIM unset($contactmethods['aim']); // Remove AIM unset($contactmethods['jabber']); // Remove Jabber return $contactmethods; }
These two functions create anchor links, and you can customize a lot of it, but it’s impossible to add a class through just using their parameters alone. Gotta add a function to functions.php:
add_filter('next_posts_link_attributes', 'posts_link_attributes'); add_filter('previous_posts_link_attributes', 'posts_link_attributes'); function posts_link_attributes() { return 'class="styled-button"'; }
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |