wordpress font size tag cloud

The default font size for wordpress tag cloud is not well formated for all wordpress theme.So how to change wordpress theme tag cloud fontsize.There is a filter for wordpress called “widget_tag_cloud_args” In this filter you can apply font-size and many more options for wordpress tag cloud.   What you have to do is add given code into your current theme’s

Read more

remove image link wordpress

By defualt when you add image from gallery the link also added to the image.A link to image can be remove easy writing small code into function.php or creating plugin. Here is code for how to remove links from images add_filter(‘the_content’, ‘remove_images_from_post_page’); function remove_images_from_post_page($content){ $content = preg_replace(‘/]*>]*)><\/a>/im’, ”, $content); return $content; } add_shortcode( ‘gallery’, ‘remove_images_links_gallery’ ); function remove_images_links_gallery($attr) { global

Read more

magento search category name

Magento how to get category collection by name ? For example here we will get category by it name $category = Mage::getModel(“catalog/category”); $collection = $category->getCollection(); $collection->addAttributeToSelect(“*”); $collection->addFieldToFilter(“name”,array(“eq”=>’test’); The above code will fetch all category named “test”.

Read more

Magento get product by attribute

For example here we will product by it name   $collectionss = Mage::getModel(‘catalog/product’)->getCollection()->addAttributeToSelect(‘*’)->addUrlRewrite(); $collectionss->addFieldToFilter(array( array(‘attribute’=>’name’,’eq’=>’test’), )) Get Product By Id $_newProduct = Mage::getModel(‘catalog/product’)->load($id);

Read more

magento add product to cart

require_once ‘app/Mage.php’; Mage::app(“default”); Mage::getSingleton(“core/session”, array(“name” => “frontend”)); $session = Mage::getSingleton(“customer/session”); $userData=Mage::helper(‘customer’)->getCustomer()->getData(); $cart = Mage::getSingleton(‘checkout/cart’); $yourProId=7; $qty=2; $params = array( ‘product’ => $yourProId, ‘related_product’ => null, ‘qty’ => $qty ); $product = new Mage_Catalog_Model_Product(); $product->load($yourProId); $cart-> addProduct($product, $params); $cart->save(); Mage::getSingleton(‘checkout/session’)->setCartWasUpdated(true); $message = (‘Your cart has been updated successfully.’); Mage::getSingleton(‘checkout/session’)->addSuccess($message);

Read more

jquery date picker

Bydefault Jquery date picker come with Jquery UI and Jquery UI has lots of css and js file so it is not as easy to use jquery date picker.So here you will find full Jquery date picker only code with downloads.This date picker is extracted from Jquery UI so you can use seprate jquery date picker without using lots of

Read more

PHP Download File Forcefully

In php there are some situation where you want to download file Forcefully.For that you have to use php header function. In header function you have to use Content-Type as application/octet-stream and Content-Disposition. ob_clean(); ob_start(); $filename=’private_movie.zip’; $absoluteFilePath=’/public_html/downloads/private_movie.zip’ header(“Pragma: public”); header (“Cache-Control: must-revalidate, post-check=0, pre-check=0”); header(“Cache-Control: maxage=1”); header (“Content-Type: application/octet-stream”); header (“Content-Length: ” . filesize($absoluteFilePath)); header (“Content-Disposition: attachment; filename=$filename”); readfile($absoluteFilePath);

Read more

jquery radio button checked value

There are losts of way to get checked radio value.The easiest way is to use “:checked” selector.The checked selector is used to get checked radio.After getting it you can use is is(“:checked”) to check wather it is checked or not.For getting value you can use .val() function. var $n = jQuery.noConflict(); //Jquery no conflict $n(“#btnsubmit”).click(function() { var allRadio=$n(‘input[name=rdoarr[]]’); jQuery.each(allRadio, function(i,

Read more

Jquery get all checkboxes

You can get all elements by name var $n = jQuery.noConflict(); //Jquery no conflict $n(“#btnsubmit”).click(function() { var allChkbox=$n(‘input[name=chkarr[]]’); jQuery.each(allChkbox, function(i, singlecheckbox) { alert(singlecheckbox.value+” is “+ singlecheckbox.checked); }); });

Read more

wordpress custom page

custom page is wordpress standalone page which is not use as wordpress page or page.there is some situation where you need custom page which will define owns html and js and othere elements using wordpress header and footer.This is very easy in wordpress to create cusom page.This wordpress custom page will depends on theme you are using.So some of customization

Read more
1 3 4 5 6 7