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
--- | |
title: About HUTT | |
subtitle: Get To Know Us | |
footer_image_url: /images/old_truck_edited.jpg | |
--- | |
<% content_for :footer do %> | |
<p>blue.css</p> | |
<% end %> |
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
<% link_to('/yourlink.html', { :class => 'classes', :"data-icon" => 'd' }) do %>Text<% end %> |
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
helpers do | |
def magic_link_to(link, url, opts={}) | |
if request.path == link | |
opts[:class] = "active" | |
end | |
link_to(link, url, opts) | |
end | |
end |
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 | |
//Custom widget Recent Posts From Specific Category | |
class Widget_Recent_Posts_From_Category extends WP_Widget { | |
function __construct() { | |
$widget_ops = array('classname' => 'widget_recent_entries_from_category', 'description' => __( "The most recent posts from specific category on your site") ); | |
parent::__construct('recent-posts-from-category', __('Recent Posts From Specific Category'), $widget_ops); | |
$this->alt_option_name = 'widget_recent_entries'; | |
add_action( 'save_post', array(&$this, 'flush_widget_cache') ); |
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 | |
// Allow subscribers to see Private posts and pages | |
$subRole = get_role( 'subscriber' ); | |
$subRole->add_cap( 'read_private_posts' ); | |
$subRole->add_cap( 'read_private_pages' ); | |
// Redirect to home page on login | |
function loginRedirect( $redirect_to, $request_redirect_to, $user ) { | |
if ( is_a( $user, 'WP_User' ) && $user->has_cap( 'edit_posts' ) === false ) { |
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 | |
// page ids of all employee directory pages | |
$bond = 37; | |
$business = 30; | |
$benefits = 51; | |
$individual = 58; | |
$employee_directory = 60; | |
// get current page id | |
$current = get_the_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
<?php | |
add_action('init', 'woo_add_portfolio'); | |
if ( !function_exists('woo_add_portfolio') ) { | |
function woo_add_portfolio() | |
{ | |
$labels = array( | |
'name' => _x('Portfolio', 'post type general name', 'woothemes'), | |
'singular_name' => _x('Portfolio Item', 'post type singular name', 'woothemes'), | |
'add_new' => _x('Add New', 'slide', 'woothemes'), | |
'add_new_item' => __('Add New Portfolio Item', 'woothemes'), |