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
/* REF : Mike Hopkins / See : https://community.getbeans.io/discussion/frontpage-with-a-post-slideshow */ | |
add_action( 'beans_main_prepend_markup', 'post_slider' ); | |
function post_slider() { | |
$query = new WP_Query( array( | |
'category_name' => 'featured', | |
'paged' => get_query_var( 'paged' ), | |
'nopaging' => 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 | |
// Do not include the opening php tag if it is already included in your file. | |
//* Note : A good practice is to load this snippet only if the plugin is activated. | |
//* Add this in your functions.php and the snippet in itself in a separate file. | |
// include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
// if( is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) { | |
// include_once( get_stylesheet_directory() . '/lib/beans-ninja-forms.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
<?php | |
// Do not include the opening php tag if it is already included in your file. | |
//* Add a sub-header on category archive page | |
add_action( 'beans_header_after_markup', 'sps_add_archive_under_header' ); | |
function sps_add_archive_under_header () { | |
if ( !is_archive() ) | |
return; | |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
//* Show Excerpt or Troncate Posts Content | |
add_filter( 'the_content', 'sps_troncate_post_content' ); | |
function sps_troncate_post_content( $content ){ | |
if ( !is_singular() ) |
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 | |
$args = array( | |
'post_type' => array( 'post' ), | |
'post_status' => array( 'publish' ), | |
'posts_per_page' => 100, // don't use -1, pick something reasonable | |
'no_found_rows' => true, // useful when pagination is not needed. | |
'update_post_meta_cache' => false, // useful when post meta will not be utilized. | |
'update_post_term_cache' => false, // useful when taxonomy terms will not be utilized. | |
// 'fields' => 'ids' // only good if all you need is ids |
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 | |
/* | |
Plugin Name: Jobs CPT | |
Plugin URI: http://yourwebsite.com/ | |
Description: Add Jobs CPT with taxonomy. Custom fields built with Beans Framework. | |
Version: 1.0 | |
Author: You. | |
Author URI: http://yoururl.com/ | |
License: GPLv2 | |
*/ |
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 | |
/* | |
Template Name: Documents | |
*/ | |
//* Remove Genesis Loop and Add Custom Loop Instead | |
remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); | |
add_action( 'genesis_entry_content', 'fcu_do_custom_loop' ); | |
/** |