Do you want to output ACF custom field value manually using a shortcode in a Beaver Builder layout? By default, modules in Beaver Builder allows you to connect to specific custom fields of your choice with simple click routines. However, for an even more custom approach, you can output custom field values manually using easy… Continue Reading
shortcode
Connect Smart Slider 3 ACF field type with Beaver Themer layout
Want to display sliders created with Smart Slider 3 plugin in your Beaver Themer layout? You can easily make this connection with the power of custom fields created with ACF Pro plugin. Here is the quick procedure to get going. Create Custom Fields with ACF Pro Plugin First, we shall create a custom field of… Continue Reading
Add self updating current year in Beaver Themer Footer layout
We are in the new year, but one can still find a lot of websites displaying the previous year in the footer area next to the copyright disclaimer text. If you are building the footer layout template using Beaver Themer addon, then you can easily switch from manual year text to self-updating current year using… Continue Reading
Toggle Button Shortcode for WordPress Site
I’m showing how you will create a simple toggle button effect with PHP & JQuery for your WordPress site. I am making the shortcode because I can easily add this button at any pages/posts or custom post type content. PHP Open the functions.php file of your active theme and add this code at end of… Continue Reading
Showing limited amount of categories on post meta
Original Message: I am trying to find a way to limit the amount of categories the Filed Under: Genesis shortcode outputs. Is there a way to do this? For example if a post belongs to 10 other categories it current displays every category, is there a way to limit it to only list x amount… Continue Reading
Column Classes Shortcode for Genesis Theme
Add the following codes in your functions.php file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
// Replace WP autop formatting if ( ! function_exists( 'gd_remove_wpautop' ) ) { function gd_remove_wpautop( $content ) { $content = do_shortcode( shortcode_unautop( $content ) ); $content = preg_replace( '#^<\/p>|^<br \/>|<p>$#', '', $content ); return $content; } // End gd_remove_wpautop() } /* ============= Two Columns ============= */ function gd_shortcode_one_half($atts, $content = null) { extract(shortcode_atts( array('first' => 'no'),$atts) ); if($first == "no"){ $class = "one-half"; } else { $class = "one-half first"; } return '<div class="' . $class . '">' . gd_remove_wpautop($content) . '</div>'; } add_shortcode( 'one_half', 'gd_shortcode_one_half' ); /* ============= Three Columns ============= */ function gd_shortcode_one_third($atts, $content = null) { extract(shortcode_atts( array('first' => 'no'),$atts) ); if($first == "no"){ $class = "one-third"; } else { $class = "one-third first"; } return '<div class="' . $class . '">' . gd_remove_wpautop($content) . '</div>'; } add_shortcode( 'one_third', 'gd_shortcode_one_third' ); function gd_shortcode_two_thirds($atts, $content = null) { extract(shortcode_atts( array('first' => 'no'),$atts) ); if($first == "no"){ $class = "two-thirds"; } else { $class = "two-thirds first"; } return '<div class="' . $class . '">' . gd_remove_wpautop($content) . '</div>'; } add_shortcode( 'two_thirds', 'gd_shortcode_two_thirds' ); /* ============= Four Columns ============= */ function gd_shortcode_one_fourth($atts, $content = null) { extract(shortcode_atts( array('first' => 'no'),$atts) ); if($first == "no"){ $class = "one-fourth"; } else { $class = "one-fourth first"; } return '<div class="' . $class . '">' . gd_remove_wpautop($content) . '</div>'; } add_shortcode( 'one_fourth', 'gd_shortcode_one_fourth' ); function gd_shortcode_two_fourths($atts, $content = null) { extract(shortcode_atts( array('first' => 'no'),$atts) ); if($first == "no"){ $class = "two-fourths"; } else { $class = "two-fourths first"; } return '<div class="' . $class . '">' . gd_remove_wpautop($content) . '</div>'; } add_shortcode( 'two_fourths', 'gd_shortcode_two_fourths' ); function gd_shortcode_three_fourths($atts, $content = null) { extract(shortcode_atts( array('first' => 'no'),$atts) ); if($first == "no"){ $class = "three-fourths"; } else { $class = "three-fourths first"; } return '<div class="' . $class . '">' . gd_remove_wpautop($content) . '</div>'; } add_shortcode( 'three_fourths', 'gd_shortcode_three_fourths' ); |
How to use these Shortcodes 1. One Half [one_half first=”yes|no”]ADD CONTENT HERE[/one_half] 2. One Third [one_third first=”yes|no”]ADD CONTENT HERE[/one_third] 3. Two Thirds [two_thirds first=”yes|no”]ADD CONTENT HERE[/two_thirds] 4. One Fourth [one_fourth first=”yes|no”]ADD CONTENT HERE[/one_fourth] 5. Two Fourth [two_fourths first=”yes|no”]ADD CONTENT HERE[/two_fourths] 6. Three Fourths [three_fourths first=”yes|no”]ADD CONTENT… Continue Reading