Samuel Elh Blog

WordPress, PHP, Python and JavaScript tutorials and snippets

Fetching Envato Sales Automatically on Linux

This simple script allows you to keep track of your sales on Envato market (CodeCanyon, Themeforeset, AudioJungle, etc). It’ll fetch the current sales count on first use, so that it’ll alert you of how many new sales you have, every time you call the command: We’ll make it work independently, whenever we open the terminal, […]

Continue Reading →

Show Currency Exchange Rates in Linux Terminal

The aim of this tutorial is to show currency exchange rates and reports as a welcoming note whenever you open your Linux computer or server. You might not always remember to check the online charts, so this tool will always remind you of the current exchange rates. For ubuntu here, I’ll be using notify-send command […]

Continue Reading →

Add Survey to WordPress Plugin Deactivation

So, you want to collect feedback from your plugin users whenever they decide to deactivate your plugin? As plugin developers, feedback matters the most in improving a plugin and adding more rich and most wanted features. The aim of this tutorial is to add a quick survey to the admin panel which will show whenever […]

Continue Reading →

Add Fallback Image for Ad blockers and Alternative Content

Selling ads is one of the main income sources for publishers and online businesses. But most publishers show more than just few couple ads per site, or annoying ads, that make us users get an ad-block client to surf safely on the internet. Using an ad blocker is also known to save you more on […]

Continue Reading →

Full Screen Centered Sections Pure CSS Mobile Friendly

This is a very basic example of what you can achieve with pure CSS `table` and `table-cell` display property values. You can divide your home page or landing page into many sections, each one takes up the full available view-port height (user screen size), and the user can scroll nicely from each section to another. […]

Continue Reading →

Protect forms and URLs from CSRF attacks with PHP nonce tokens

While developing a secure PHP web application, we want to ensure all actions are authorized and requests are honored only when they’re received from our trusted end-users. A hacker can put together a URL with GET form data and somehow forwards it to the user, which can result in commands being executed using the credentials […]

Continue Reading →

Add fields to BuddyPress registration form and profile

In this tutorial, we’ll learn about how we can programmatically add custom fields to BuddyPress registration form, validate these fields and process them, and then show the user values in the user profile page. If you haven’t already learned, BuddyPress acts like a WordPress multisite environment when it comes to handling signups. BuddyPress at first validates […]

Continue Reading →

Compatibility – Checking PHP and WP versions before running your plugin

In this quick tip, we’ll learn about how to ensure our WordPress plugin runs and executes code only when certain conditions are met, mainly compatibility conditions such as having a minimal PHP version to be supported, and a WordPress version as well. I wrote a PHP helper class yesterday and its aim is to wrap […]

Continue Reading →

MailChimp WordPress Feed – Adding a Featured Image and a Read More Button

In this quick tip, we’ll learn about tweaking our blog posts feed in order for MailChimp RSS-to-Email service to fetch it and actually parse the posts featured images and a read more button that links to the actual post. If you don’t have any RSS-to-email campaign yet, you can learn more about sharing your blog posts […]

Continue Reading →
« Older posts

© 2018 Samuel Elh - Powered by WordPress, DigitalOcean & NameCheap

Theme by Anders NorenUp ↑

Subscribe to our mailing list

Sign up to receive updates about WordPress, free and premium plugins and themes in general and tips and tricks

* indicates required