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

Setting home and siteurl dynamically in Wordpress

10 Dec 2016 09:44:06

Setting home and siteurl dynamically in Wordpress

If for some reason you have set siteurl and / or home options wrong in your WordPress installation database and as a result can't access admin panel, or perhaps have a reason not to change these options in wp_options table, you can overwrite them either in wp_config.php or ...

Read more »

The most used Wordpress hooks

28 Nov 2016 20:53:05

The most used Wordpress hooks

Below is a list of the most often used hooks (sorted by the number of callbacks attached ) on a vanilla installation of WordPress (v.4.6.1) with twentysixteen theme loaded. On such a setup, in total I found 261 hooks, something was attached to. As seen in the list, the most ...

Read more »

Find total of a column of numbers with BASH

28 Nov 2016 20:53:05

Find total of a column of numbers with BASH

Suppose you have a file with a long list of items followed or perhaps preceded by whole numbers and you are asked to find the total of those numbers. The file might look like this (case 1): aaa:23 bb:2 ccc:98 . . . or perhaps like this (case ...

Read more »