Get pages by template in WordPress

I’d originally posted this on the WordPress StackExchange site, but thought I’d share it here as well. If you ever need to get pages which use a certain template, you can use the following query. You can then use the loop as normal to iterate over the pages, as well as expanding on the above query, such as setting the order. It may have once been useful to be able to just specify the page template in the query with an additional parameter, but I feel the widespread need for this is now gone, as many cases which would use…

Removing fields for logged in users in Gravity Forms

Gravity Forms is one of my favourite WordPress plug-ins due to it’s ease of use, flexability and extensibilty. In a recent project I needed to be able to show or hide a set of fields dependant on if the user was logged in. Although Gravity Forms allows for conditional fields, these are dependant on other form fields. As part of the registtration process, we collected numerous pieces of information, and many of the same fields would appear in other forms within the site. Why should users who have already registered and given all that infoamtion once have to do it…