A quick snippet to check whether the post image is naturally landscape or portrait.
I can’t remember who came up with this first but here’s a link to the person I think came up with the code.
Just a quick example of how we can use output buffering in PHP.
There are several types of query that you can perform within a WP_Query – one of which is date_query.
There may come a time when you want to get a frontend template from an admin function – possibly some form of shared observer function – normally you wouldn’t be able to grab the file because Magento will instinctively look inside it’s own area (adminhtml)…
If you want to update a table using DDL – for example you want to add a column – you can do so simply by using the following snippet in your upgrade scripts.
You have the ability in Magento to create tables in your own sql installer scripts using DDL (database definition language). DDL acts as a syntax to convert common database methods into the appropriate database language used on your server. Rather than writing separate queries for…
If ever you cannot get into your Magento administration panel but need to clear the cache – simply perform the following.
If you want to remove a css/js file from your head using XML you can do so with the following snippet.
You can easily get information out of the current posts’ taxonomy by using the following snippet.