Create ,update static blocks magento script

This tutorial explains how to create and update static blocks using the magento scripts.For that I have create a file in the magento root folder. Then I have created an array which contains the details of the static block as shown below.

If we are creating the CMS blocks using the script it is easy to move the blocks from the develop database to live database without redoing those changes in the magento backend.

Filter posts by custom fields wp_query

This tutorial I am explaining how to filter posts by custom fields using wp_query. Using wordpress meta_query() parameter we can retrieve the post based on the custom field.

Here I am filtering the post based on the category name and the custom field ‘front_page’ checkbox. Then displaying those filtered posts as blocks in the home page.Please refer the image below.I have created a custom field checkbox and filtering the post based on that from the database.

Create custom attribute source type magento

This tutorial explains how to create custom attribute source type in magento. Here I am creating an attribute and set the source type as categories in the product page.

This module creates a dropdown attribute and listed all the categories in the category section as the options.This dropdown options change dynamically based on the categories in the category section.