Make sure jQuery and Bootstrap's Tootip and Popover plugins are included: http://getbootstrap.com/javascript/ http://getbootstrap.com/customize/
Then add the following...
| <?php | |
| // Filter out Builder extensions except those provided by the custom child theme | |
| add_filter( 'builder_get_extension_directories', 'intw_set_extensions_directory' ); | |
| function intw_set_extensions_directory( $directories ) { | |
| $directories = array( | |
| get_template_directory() . '/extensions', | |
| get_stylesheet_directory() . '/extensions', | |
| ); | |
| $directories = array_unique( $directories ); |
| <?php | |
| // List all hooked functions, sorted by priority | |
| add_action('wp_head', 'intw_list_hooked_functions'); | |
| function intw_list_hooked_functions($tag=false){ | |
| global $wp_filter; | |
| if ($tag) { | |
| $hook[$tag]=$wp_filter[$tag]; | |
| if (!is_array($hook[$tag])) { |
| <?php | |
| // New 'Enter title here' text for custom post type | |
| add_filter('enter_title_here', 'intw_filter_enter_title_here'); | |
| function intw_filter_enter_title_here( $message ) { | |
| global $post; | |
| if ('POSTTYPE' == $post->post_type) { | |
| $message = 'NEW MESSAGE'; | |
| } | |
| return $message; |
| User-agent: * | |
| Disallow: /wp-admin | |
| Disallow: /wp-includes | |
| Disallow: /wp-content/plugins | |
| Disallow: /wp-content/cache | |
| Disallow: /wp-content/themes | |
| Disallow: /wp-includes/js | |
| Disallow: /trackback | |
| Disallow: /category/*/* | |
| Disallow: */trackback |
Make sure jQuery and Bootstrap's Tootip and Popover plugins are included: http://getbootstrap.com/javascript/ http://getbootstrap.com/customize/
Then add the following...
| <?php | |
| add_filter('builder_filter_current_layout', 'intw_builder_filter_current_layout'); | |
| function intw_builder_filter_current_layout( $layout_id ) { | |
| if ( is_single() && in_category( 'news' ) ) | |
| return '4e5f997043d8e'; | |
| return $layout_id; | |
| } |
| <?php | |
| // Featured image as background | |
| add_action('wp_head', 'intw_head'); | |
| function intw_head() { | |
| if( is_page() && !is_front_page() ) { | |
| if( has_post_thumbnail() ) { | |
| $featimg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full', false ); | |
| $featimg_url = $featimg[0]; | |
| } else { |
| #replace { | |
| background: url("myimage") 0 0 no-repeat; | |
| text-indent: 100%; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| } |
| <?php | |
| // If featured image is set, use it | |
| if ( has_post_thumbnail() ) { | |
| the_post_thumbnail('full'); | |
| // If no featured image, use specified image (change ID '1' to desired image) | |
| } else { | |
| echo wp_get_attachment_image(1, 'full'); | |
| } |
Add the following to theme's functions.php file (modify module type if needed):
// Add Support for Alternate Module Styles
add_action( 'it_libraries_loaded', 'it_builder_loaded' );
if ( ! function_exists( 'it_builder_loaded' ) ) {
function it_builder_loaded() {
builder_register_module_style( 'navigation', 'Sticky Navigation', 'navigation-sticky' );
}