This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'genesis_before_post_content', 'wcodex_before_post_content_image', 5 ); | |
function wcodex_before_post_content_image() { | |
if ( is_page() ) return; | |
if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) { | |
printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'genesis_before_post_content', 'wcodex_before_post_content_image', 5 ); | |
function wcodex_before_post_content_image() { | |
if ( is_page() ) return; | |
if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) { | |
printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$allproduct = Mage::getModel(‘catalog/product’)->getCollection()->setOrder(‘entity_id’,'desc’)->getData(); | |
$_helper = $this->helper(‘catalog/output’); | |
foreach($allproduct as $product){ | |
echo ‘<div class="product_box">’; | |
$obj = Mage::getModel(‘catalog/product’); | |
$productid = $product['entity_id']; | |
$_product = $obj->load($productid); // Enter your Product Id in $product_id | |
$productName = $_product->getName(); | |
$productDescription = $_product->getDescription(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To Get the current store | |
$store = Mage::app()->getStore(); | |
//To get Store Id | |
$store_id = Mage::app()->getStore()->getStoreId(); | |
//To get Store Code | |
$store_code = Mage::app()->getStore()->getCode(); | |
//To get Website Id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for Rounded responsive | |
<img src="lion.jpg" class="img-rounded img-responsive" alt="" /> | |
//for circle responsive | |
<img src="lion.jpg" class="img-circle img-responsive" alt="" /> | |
For poloroid responsive | |
<img src="lion.jpg" class="img-poloroid img-responsive" alt="" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class=”col-md-6″>Sample text goes here/half part</div> | |
<div class=”col-md-6″>Sample text goes here/half part</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
?> | |
<form class="navbar-form" role="search" action="<?php echo site_url('/'); ?>" method="get" > | |
<div class="input-group"> | |
<input type="text" class="form-control" placeholder="Search" name="s" id="search" value="<?php the_search_query(); ?>"> | |
<div class="input-group-btn"> | |
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button> | |
</div> | |
</div> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>Carousel in web page using Bootstrap</h1> | |
<div class="carousel" id="sample-carousel"> | |
<div class="carousel-inner"> | |
<div class="item active"><img alt="" src="http://lorempixel.com/1200/600" /> | |
<div class="caurosel-caption"> | |
<h4>How are you?</h4> | |
This is my sample carousel using Bootstrap</div> | |
</div> | |
<div class="item"><img alt="" src="http://lorempixel.com/1200/600/car" /></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*This code is used to display the caterogy name in list.phtml file*/ | |
echo $this->getLayer()->getCurrentCategory()->getName() | |
/*How to hide or delete the page title on same list.phtml | |
1. go to catalog/categoy/page.phtml | |
2. Comment out or delete follwing code | |
*/ | |
<div class="page-title"> | |
<h1><?php echo $this->getTitle() ?></h1> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
You can add the stylesheet link tag directly on the page using the wp_head action | |
You can add the stylesheet link tag directly to the page anywhere. | |
You can use the wp_enqueue_scripts action to add a handle to the wp_enqueue_style. | |
Syntax | |
wp_enqueue_style( $handle, $src, $deps, $ver, $media ); |
NewerOlder