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
<script> | |
if ($('[data-title="bump-image"]').length > 0) { | |
$('.otoText2').append($('[data-title="bump-image"]')); | |
} | |
</script> |
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
.row { | |
width: 100%; | |
text-align: center; | |
} | |
.columns { | |
width: 33%; | |
min-width: 280px; | |
vertical-align: top;/*Fix for different height elements*/ | |
margin-bottom: 10px; |
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
- Check rails version | |
$ rails -v | |
- To update rails | |
$ gem update rails | |
- Creating a new rails app using postgresql | |
$ mkdir rails_projects | |
$ cd rails_projects | |
$ rails new myapp --database=postgresql |
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
jQuery(document).ready(function(){ | |
jQuery(".home li.product").wrap('<div class="overlay"></div>'); | |
jQuery('.woocommerce ul.products li.product a img').wrap('<div class="tint"></div>'); | |
jQuery("li.product").wrap('<div class="overlay"></div>'); | |
jQuery('li.product a img').wrap('<div class="tint"></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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
//* Customize the post info function | |
add_filter( 'genesis_post_info', 'sp_post_info_filter' ); | |
function sp_post_info_filter($post_info) { | |
if ( !is_page() ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
}} |
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
//Read More Button For Excerpt | |
function themeprefix_excerpt_read_more_link( $output ) { | |
global $post; | |
return $output . ' <a href="' . get_permalink( $post->ID ) . '" class="more-link" title="Read More">Read More</a>'; | |
} | |
add_filter( 'the_excerpt', 'themeprefix_excerpt_read_more_link' ); |
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
//* Don't show layout settings box on certain template pages admin | |
add_action( 'init', 'remove_layouts_templates_init' ); | |
function remove_layouts_templates_init() { | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; | |
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE); | |
// check for the following template types | |
if ($template_file == 'page-home.php' | |
or $template_file == 'page-testimonial.php' | |
or $template_file == 'page-landing.php' |
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( 'tgmpa_register', 'register_required_plugins' ); | |
// This function is called from the above hook | |
function register_required_plugins() | |
{ | |
// The plugins array allows us to define multiple plugins we want to include. | |
// The commented out example shows how we can include and activation a bundled | |
// plugin zip file in our theme. | |
$plugins = array( | |
/* array( |
NewerOlder