![]() ![]() With this great snippet from Brutal Business, all fields are filled automatically using the filename. It is also a lot of work, or you may forget. Create dashboard widget of most recent postsįoreach( $myposts as $post ) : setup_postdata($post) ?>Īdd_filter( 'manage_media_columns', 'muc_column' ) Īdd_action( 'manage_media_custom_column', 'muc_value', 10, 2 ) Ģ.05 Automatically set image Title, Alt-Text, Caption & Description upon uploadįor SEO and usability purposes, filling out the extra fields for each image is advisable. In the example it’s set at 5, but you can change the figure to whatever suits you. I never use the Links function, so I always remove it altogether.Īdd_action( 'admin_menu', 'remove_links_menu' ) ġ.13 Create dashboard widget with most recent postsĪnother snippet, this adds a widget to the dashboard containing the most recent posts. 1.00 WP admin snippets 1.01 Add your own custom logo to the WordPress dashboardĪdd_action('admin_head', 'my_custom_logo') This especially applies for plugins that load extra css or js files. Plug-ins are a great thing, but require extra maintenance, may pose extra security risk and often come with more functionality than required, making the site unnecessarily bloated. In my humble opinion, this is highly preferable over adding plug-ins for all those functions. '/inc/custom-functions.php' Įach of the snippets here should be added to functions.php (or a custom functions file like I created), unless specifically mentioned otherwise. I created my own custom-functions.php with extra functions, which is called at the bottom of functions.php with the following line of code: I have mentioned the original source of the snippet wherever I had it documented. None of them are of my own making, although some I have refined or retuned to my specific need. ![]() ![]() #Code snippet saver code#This page is a collection of WordPress code snippets I have collected. It also works with SASS, which I prefer over LESS.įor extra functionality, I primarily search for solutions that do not require a plug-in. I made my own adaptation of the html5blank theme, which I think is an excellent compromise between bare theme and basic functionalities. Because I like to build my websites as lean as possible, I like using a bare framework theme. WordPress is a wonderfully flexible CMS, you can make almost any kind of site with it. #Code snippet saver how to#How to apply post styling per category in WordPress.How to create a static WordPress navigation menu.How to create a WordPress splash and static home page.How to create a website Favicon using Photoshop.How to solve Current Date and timezone issue in WordPress.How to create a clipping mask in InDesign by Adobe.How to create a mirror reflection with Photoshop.How to make a presentation slideshow using InDesign. #Code snippet saver full#How to apply a full screen background image.How to move your MODx website to a subdomain.How to configure and customize ContactForm7 for WordPress.How to display the Read More tag in excerpts on a category page in WordPress.How to show related posts using custom taxonomy in WordPress.How to target a specific browser using CSS only.How to port the jQuery Horizontal Image Scroller to WordPress.How to find post, page, tag, category and media ID in WordPress. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |