Article of the week

Find first image URL in WordPress post content

Find first image URL in WordPress post content

29 Dec 2016 06:59:28


Finding first image URL in a WordPress post content with a few lines of PHP code.


With ever growing importance of websites like Pinterest, and in particular due to their reliance on images, and for general post linking purposes often it is desirable or even necessary to be able to find at least one image in your WordPress blog entry automatically and in an ...

Read full article »

Recent articles

Using WordPress on the command line

20 Apr 2018 15:12:07

Using WordPress on the command line

There are situations where it is handy to speak to WordPress directly from the the command line. For example, imagine that you must regain access to your website's admin panel after you have your website's admin area access locked out because you have forgotten your ...

Read more »

POST request and Transients API in WordPress

16 Apr 2018 22:25:52

POST request and Transients API in WordPress

It is striking how often basic scripting of POST request can cause a real headache to a person who is not somewhat familiar with certain assumptions WordPress makes on how these requests should be handled. Even more confusion can ensue in cases when a feedback has to be given ...

Read more »

Watermarking images with ImageMagick and BASH

30 Oct 2017 21:11:08

Watermarking images with ImageMagick and BASH

In this article I give a command line script for watermarking JPEG and PNG files with ImageMagick. Primary reason for me to write the script was the need of watermarking a large number of my own graphics files before posting them online as well as watermarking JPEGs and PNGs for ...

Read more »

Finding permutations with Heap algorithm in PHP

26 Oct 2017 16:54:32

Finding permutations with Heap algorithm in PHP

Suppose, you are given a list of two items, say one is called "a" and the other "b" and asked to find all the possible arrangements (also called permutations without repetition) of these items. All your arrangements should consist of exactly the number of ...

Read more »