Month: June 2016

Home / 2016 / June

How to separate WordPress loop into sections

In one of my recent projects, the client wanted to create a homepage with several different layouts for groups of posts. Normally this is not a problem – you can just create several loops, reset them, and you can get any imaginable layout. But this was a different pair of boots – the homepage consisted...


How to retrieve featured image URL in WordPress

If (for some reason) you have the need to get the featured image (or post thumbnail) URL, you can do it with wp_get_attachment_image_src() function, for example like this: [crayon-5a345cef70262435944062/]  


How to get commenter ID in WordPress

If you want to output some data (such as biographical info or personal website) for the person who commented on WordPress post or page, you should be able to get the user ID so you could use it for the_author_meta() function.


How to create custom comment walker class in WordPress

There are several walker classes in WordPress – I don’t actually know how many there are because I tend to browse the source code only if I need to change something, just as others I guess :). Regardless, I’m sure that custom navigation walker class is probably the most used and customized WordPress walker class. But...