This file contains 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 Font Awesome for social icons | |
function font_awesome() { | |
echo '<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />'; | |
} | |
add_action('wp_head', 'font_awesome'); |
This file contains 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 style.css to header | |
// ---------------------------------- | |
function vinx_style() { | |
wp_enqueue_style( 'Vin-X Style', get_stylesheet_uri() ); | |
} | |
add_action( 'wp_enqueue_scripts', 'vinx_style' ); | |
// Add Script to header |
This file contains 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
$font-family-sans-serif: 'Roboto', sans-serif !default; | |
$font-family-serif: 'Lobster Two', cursive !default; | |
$font-family-special: 'Libre Franklin', sans-serif !default; |
This file contains 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
// This example will display 3 posts from category 7 | |
<?php query_posts('showposts=3&cat=7'); ?> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<div class="col-md-4"> | |
<h3><?php the_title(); ?></h3> | |
<?php the_excerpt(__('(more…)')); ?> | |
<a class="btn btn-default" href="<?php the_permalink() ?>" role="button">Read More</a> | |
</div> | |
<?php endwhile; endif; ?> |
This file contains 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
// Register Menus | |
function register_my_menus() { | |
register_nav_menus( | |
array( | |
'header' => __( 'Header' ), | |
'footer' => __( 'Footer' ) | |
) | |
); | |
} | |
add_action( 'init', 'register_my_menus' ); |
This file contains 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
// Purge WP-flavoured classes on the WP Menu | |
add_filter('nav_menu_item_id', 'clear_nav_menu_item_id', 10, 3); | |
function clear_nav_menu_item_id($id, $item, $args) { | |
return ""; | |
} | |
add_filter('nav_menu_css_class', 'clear_nav_menu_item_class', 10, 3); | |
function clear_nav_menu_item_class($classes, $item, $args) { | |
return array(); | |
} |
This file contains 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 Google Analytics to Footer | |
function add_google_analytics() { | |
echo '<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>'; | |
echo '<script type="text/javascript">'; | |
echo 'var pageTracker = _gat._getTracker("UA-XXXXX-X");'; | |
echo 'pageTracker._trackPageview();'; | |
echo '</script>'; | |
} | |
add_action('wp_footer', 'add_google_analytics'); |
This file contains 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
<!-- File Path: app/design/frontend/rwd/default/template/catalog/product/view.phtml --> | |
<!-- Replace this... --> | |
<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?> | |
<!-- ...with this --> | |
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> |