Community Forums › Forums › Archived Forums › Design Tips and Tricks › Shortcode in Parallax Home widgets
- This topic has 5 replies, 3 voices, and was last updated 9 years, 9 months ago by
brookelustig.
-
AuthorPosts
-
April 23, 2015 at 6:35 am #148890
brookelustig
MemberHi everyone been stuck trying to add a shortcode on the home widgets of the parallax pro theme. Nothing will show regardless what I do...I have tried adding several codes I have found here at the forum, that suppose to allow shortcodes on widgets to functions.php but still nothing will appear on the home page.
Anyone who can give me advice getting shortcodes working with the Parallax theme on the home widgets?
April 23, 2015 at 8:00 am #148898Brad Dalton
ParticipantThis will work if added to your child theme functions file and enable short codes in a text widget:
add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode');
April 23, 2015 at 8:12 am #148899brookelustig
MemberHi Brad, I saw this code earlier when I did research here at the forum but for some reason it's not working for me. I can't figure out what I'm doing wrong. What I'm a missing? The short code is working everywhere else expect the home widgets.
I added the code right before the end of the child functions php and posted the short code in a text widget. Below is the end of the child functions php.
Thank you for taking the time!
//* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 1 ); //* Add support for after entry widget add_theme_support( 'genesis-after-entry-widget-area' ); //* Relocate after entry widget remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' ); add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 ); //* Register widget areas genesis_register_sidebar( array( 'id' => 'home-section-1', 'name' => __( 'Home Section 1', 'parallax' ), 'description' => __( 'This is the home section 1 section.', 'parallax' ), ) ); genesis_register_sidebar( array( 'id' => 'home-section-2', 'name' => __( 'Home Section 2', 'parallax' ), 'description' => __( 'This is the home section 2 section.', 'parallax' ), ) ); genesis_register_sidebar( array( 'id' => 'home-section-3', 'name' => __( 'Home Section 3', 'parallax' ), 'description' => __( 'This is the home section 3 section.', 'parallax' ), ) ); genesis_register_sidebar( array( 'id' => 'home-section-4', 'name' => __( 'Home Section 4', 'parallax' ), 'description' => __( 'This is the home section 4 section.', 'parallax' ), ) ); genesis_register_sidebar( array( 'id' => 'home-section-5', 'name' => __( 'Home Section 5', 'parallax' ), 'description' => __( 'This is the home section 5 section.', 'parallax' ), ) ); add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); //* Customize the credits add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' ); function sp_footer_creds_text() { echo '<div class="creds"><p>'; echo 'Copyright © '; echo date('Y'); echo ' · VVS KATALOGEN'; echo '</p></div>'; }
April 23, 2015 at 4:04 pm #148944Ren Ventura
MemberIs the literal text of the shortcode showing or is it just not rendering anything? Can you explain what you're trying to add and provide a link?
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
April 24, 2015 at 2:25 am #148986brookelustig
MemberHi Ren, nothing is showing at all. It's not rendering anything. I'm trying to add a search form with a plugin using the code [sabai-directory-search-form]. The shortcode is working everywhere else expect the home widgets. My site is vvskatalogen.se
Any help would be much appreciated I have been banging my head on the wall these past days
April 24, 2015 at 1:51 pm #149063brookelustig
MemberI also tried adding the add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); on front-page.php but that doesn't help either. Can't figure why it's not working, anyone with any advice?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.