Puddinq.com sharing knowledge

Guest writer

Guest writer

Guest writer is a puddinq plugin that could suit your needs. The setup is simple: create a user role that can edit one post type. The options vary from allowing (un) registered people posting content that is automatically published or after a test of a moderator. Let people register frontend and create edit / posts […]

Debug WordPress live

If you want to know about errors on a production site your could set WP_DEBUG to true. But visitors will be able to see the errors and as a result trust in your site declines, to debug WordPress live it is best to log.

WPML switch backend language on language switch

Since wp 4.7 the backend language is changed by changing the language in your userprofile. Using WPML, if you change the site language or post-, page language, the backend language is not changing. The code below changes the site language when changing the wpml language selector.

Displaying responsive image in WordPress

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

Add attachment to WooCommerce mail for certain products

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 […]

Object orientated programming and namespaces in wordpress

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 Rewrite urls to pretty permalinks

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 […]

Puddinq Dashboard - a bright, sunny view on the wp admin dashboard

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

WordPress add user capability on plugin activation

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.

WordPress php variabele in javascript and ajax request

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 […]