Since WordPress 4.4, WordPress has its own way to display responsive images. The <img> tag can now hold a variety of sources that can be displayed based on the screen te page is viewed on. Displaying a thumbnail image
Lets say you want an attachment.pdf added to an completed order mail in WooCommerce if certain products are in the order. How do you add and attachment in that case? With the following code you be able to select one of the mails send in the proces and add the attachment if one of the […]
Recently I did a 4 parts tutorial Tom McFarlin wrote on object orientated programming and namespaces in WordPress and it really shed some light on both subjects for me. The link. IT, webdesign … programming they all come with the aspect of learning. Like PHPStorm just had a mayor update, things change and you need […]
WordPress is brilliant and handles a lot out of the box. This post goes beyond that. In settings you can influence your permalinks. You can build structures with prefixes, categories, tags, and dates but that’s about it, what if you want to use acf fields for permalink structure? Permalinks The permalink for this post is […]
A bright, sunny view on the wp admin dashboard. The Puddinq Dashboard adds functionality and coloring to the admin dashboard. Optional settings Show/ hide widgets Hide WordPress logo and menu Change to colors of the dashboard
In the situation below is a class with two methods which could be hooked to plugin (de)activation. The first gets the user with the same e-mail address as the website (settings->general) and adds a capability to that user. The second removes the capability from all users that have it.
Once a page is loaded you can use Javascript to make an additional request for information. This requires a javascript file and a php function allowed to pass that information. All you need This article gives you all you need to make a plugin that can: Use a php variabele in a javascript file. (make […]
If you want to sort by title The code on the right is a individual loop you could place in wordpress. In the arguments the orderby is set to title, so posts will show alphabetically. Up and down can be set with DESC or ASC. Reorder the main loop If you want your frontpage blogroll […]
Decide who can see the content The code on the below can be used to: Show content only to members [member]visible by members[/member] Sow content only to guests [visitor]visible by visitors[/visitor] Place it in the funtions.php in your theme folder. function visitor_check_shortcode( $atts, $content = null ) { if ( ( !is_user_logged_in() && !is_null( $content […]
To develop a WordPress Multisite on a Wamp server some extra steps are needed before you can start with the famous 5 minute installation of WordPress, followed by the steps to initiate the WordPress Multisite. 1. The first step will be to define the wanted domain names to be available in your pc. These domain […]