Browsed by
Category: Wordpress

WordPress errors uploading images

WordPress errors uploading images

I recently encountered a problem with WordPress image uploads. The following code was called to attach an uploaded image to a WordPress post and set it as the WordPress featured image, or post thumbnail as its called in the code.. The problem is that the code kept failing. We checked the logging of is_wp_error and found the following error: Our site uses SSL (https://), however on the server itself we use a self signed certificate. The reason for this is…

Read More Read More

Show only user’s own media files in WordPress

Show only user’s own media files in WordPress

The problem I recently did a site for a client in wordpress which required a custom user type. These users needed to be able to use the media library but only to see their own media files. One would have thought that this is actually quite a common scenario so I thought that implementing it would be simple enough… In my research I came across a wordpress plugin called “View own posts media only”. This apparently worked well for a…

Read More Read More

WordPress wp_remote_get

WordPress wp_remote_get

I was recently working on a project which involved using WordPress cron for some automated tasks. Although the function wrapping the call to the WordPress even scheduler reported being called, the ‘work’ was not being done (in this case retrieving data from a remote server). This was particularly strange because if I ran the functionality manually it worked. Note: I inherited this system from another developer so any references to code duplication are not of my doing! Upon closer investigation…

Read More Read More

Creating Separate Categories for Learndash

Creating Separate Categories for Learndash

I was recently tasked with assisting in setting up a website which needed, amongst other things a Learner Management System. One of the go to LMS for WordPress is the Learndash plugin. I installed Learndash and then proceeded to set up a test course. Now, the idea with this website (which I believe is common to many sites) is that there would be both a courses section as well as a blog. The blog would have categories like “Getting Started”,…

Read More Read More

Spam Trap for Contact Form 7

Spam Trap for Contact Form 7

This plugin adds spam checks to catch contact form 7 spam. It does so in the background without annoying your legitimate users with captchas. It adds a hidden field to the your contact form 7 form and then checks when a contact form 7 is submitted for that field. If its not present, or its filled in, then we can be sure that it was a bot of some sort. It also adds the ability to check for links in…

Read More Read More

How to fix WordPress after changing table prefix

How to fix WordPress after changing table prefix

In this article find out how to fix WordPress after changing the table prefix. In your wordpress wp-config.php file you have a $table_prefix variable, which by default is set to “wp_”. If you need to change that on an existing wordpress site then you’re in for a bit of a battle. On a site I’m working with we needed to change the table prefix when moving the site to a new server. Changing the table prefix meant that we weren’t…

Read More Read More