If you want to get the URL, width and height of the featured image of a certain post / page you can use the below code.
$featuredImgDetails = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "Full");
The above code can be used in the post / page template file and $featuredImgDetails will be an array with
$featuredImgDetails = Image URL
$featuredImgDetails = Image Width
$featuredImgDetails = Image Height
Posted in Wordpress
An annoying bug if you are using the Special Price feature of a product in Magento. Even after the Special Price To Date is crossed Magento continues to show the reduced price in the product listing / category / catalog page. It however shows the correct price in the product details page.
In admin panel go to System -> Index Management
Reindex Product Prices
This solves the issue, but as it needs to be done manually is still a problem when lots of promotions are set up. One need to reindex the data manually once every day. One can also try and setup a cron job to do this automatically everyday.
If you want to open two different accounts in the same site (like Facebook, Gmail etc.) simultaneously using Firefox try the following method –
1. Log into the first Facebook account in Firefox
2. Press Ctrl+Shift+P to open a New Private Window.
Alternatively you can click the File menu on top left and choose “New Private Window” from there.
Voila! You will be allowed to login to a new Facebook account from the private browsing tab.
To do the same from Chrome check out this post.
If you want to open two different accounts in the same site (like Facebook, Gmail etc.) simultaneously using Chrome try the following method –
1. Log into the first Facebook account in Chrome
2. Press Ctrl+Shift+N to open a New incognito window.
Alternatively you can click the menu icon on top right and choose “New incognito window” from there.
Voila! You will be allowed to login to a new Facebook account from the incognito tab.
To do the same from Firefox check out this post.
While working within the theme files you can easily get the current theme URL by calling –
But if you are working with a child theme it would return the URL of the parent theme. To get the current Child theme URL you can use the following –
Happy coding 🙂