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
// Place this in a WordPress theme's functions.php | |
// Custom views for Carrington Build modules | |
// insert your correct file path to the view file | |
function my_build_carousel_view() { | |
return CFCT_PATH.'carrington-build-modules/carousel/view.php'; | |
} | |
add_filter('cfct-module-cfct-module-carousel-view', 'my_build_carousel_view'); |
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
// Remove default Carrington Build styles, be sure to add theme specific styles instead | |
function dequeue_build_styles() { | |
wp_dequeue_style('cfct-build-css'); | |
} | |
add_action('wp_enqueue_scripts', 'dequeue_build_styles', 999); |
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 the following to your theme's function.php file | |
Useful when you have multiple excerpt and/or content files | |
*/ | |
// Check to see if the post has a featured image then output HTML | |
// Then add a class to via post_class if it does | |
function my_post_thumbnail($thumb_size = 'thumbnail') { | |
if ( has_post_thumbnail() ) { | |
ob_start(); |
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
Show hidden characters
{ | |
"create_window_at_startup": false, | |
"detect_indentation": false, | |
"draw_white_space": "all", | |
"font_size": 14.0, | |
"font_options": | |
[ | |
"gray_antialias" | |
], | |
"highlight_line": true, |
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
/** | |
* Remove modules that are not wanted/needed. | |
* This example removes the carousel and hero modules. | |
* You just need to pass the ID of desired module(s) to remove. | |
*/ | |
function build_deregister_modules() { | |
cfct_build_deregister_module('cfct_module_carousel'); | |
cfct_build_deregister_module('cfct_module_hero'); | |
} | |
add_action('cfct-modules-included', 'build_deregister_modules'); |
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
/** | |
* Outputs recent posts with the desired markup and data. | |
* Used in place of a widget to meet design requirements. | |
* | |
* Load in your theme template files with this <?php _my_recent_posts(); ?> | |
*/ | |
function _my_recent_posts($recent_number = '8') { | |
$args = array( 'numberposts' => $recent_number ); | |
$recent_posts = wp_get_recent_posts( $args ); | |
echo '<ul class="recent-entries">'; |
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
.middle { | |
position: absolute; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
margin: auto; | |
} |
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
/** | |
* Smooth Scrolling Anchor Links | |
* http://www.sycha.com/jquery-smooth-scrolling-internal-anchor-links | |
*/ | |
$(".scroll").click(function(event){ | |
event.preventDefault(); | |
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 500); | |
}); |
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
<!-- Responsive iFrame --> | |
<div class="flexible-container"> | |
<iframe>i</iframe> | |
</div |
OlderNewer