Search Tools
List
| <?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; | |
| <?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' ); | |
| // } |
| /* 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 |
| <?php | |
| //*https://community.getbeans.io/discussion/customize-post-view-on-index-php/#post-1737 | |
| beans_modify_action_callback( 'beans_loop_template', 'example_loop' ); | |
| function example_loop() { | |
| if ( have_posts() && !is_404() ) : while ( have_posts() ) : the_post(); ?> |
| <?php | |
| //https://community.getbeans.io/discussion/pretty-date/#post-1975 | |
| // Change the post meta date prefix. | |
| add_filter( 'beans_post_meta_date_prefix_output', 'example_post_meta_date_prefix' ); | |
| function example_post_meta_date_prefix() { | |
| echo 'Posted: '; |
| https://community.getbeans.io/discussion/off-canvas-menus/#post-476 | |
| add_filter( 'beans_layout_grid_settings', 'example_modify_grid' ); | |
| function example_modify_grid( $args ) { | |
| return array_merge( $args, array( | |
| 'grid' => 6, | |
| 'sidebar_primary' => 1, | |
| 'sidebar_secondary' => 1, |
| <?php | |
| add_action( 'wp', 'sps_custom_output' ); | |
| function sps_custom_output() { | |
| if ( is_singular ( array ('post') ) ) { | |
| /* Featured Image with Background Effect */ | |
| beans_add_attribute( 'beans_post_header', 'class', 'uk-cover-background uk-position-relative uk-contrast' ); |
| <?php | |
| // Do not include the opening php tag if it is already included in your file. | |
| add_action( 'wp', 'beans_child_setup_document' ); | |
| function beans_child_setup_document() { | |
| // Only apply to non-singular layouts. | |
| if ( !is_singular() ) { |