• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding ShortCode to the Homepage

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding ShortCode to the Homepage

This topic is: not resolved

Tagged: shortcode

  • This topic has 6 replies, 3 voices, and was last updated 12 years ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 14, 2014 at 5:38 pm #90383
    drezac
    Member

    I'm having trouble adding a jquery custom slider to my Genesis Child theme

    The code they gave me is:

    <?php echo do_shortcode('[all_around id="1"]'); ?>

    I'm trying to insert this on home.php, but getting an error:
    Parse error: syntax error, unexpected '<' in /home/content/33/6807133/html/test/wp-content/themes/pintercast/home.php on line 34

    Is this how I add shortcode to my Genesis theme, or is there another way?

    Thanks!

    February 15, 2014 at 2:32 am #90457
    Davinder Singh Kainth
    Member

    If you are adding this code in a widget to execute, then you must use plugin to allow widgets to execute php code - http://www.basicwp.com/run-php-code-wordpress-text-widget/


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    February 15, 2014 at 9:35 am #90475
    drezac
    Member

    This is not a widget. This is on the main front page. I've looked around and seen some people actually place code in the functions.php to insert their sliders. I tried inserting it on the home.php, but I get an error.

    The instructions that came with the slider- were not Genesis friendly.

    Dan

    February 15, 2014 at 2:22 pm #90530
    Brad Dalton
    Participant

    Which slider? jquery custom slider

    Link to the slider docs please

    Here's how its done http://wpsites.net/web-design/executing-shortcodes-in-hook-locations-using-functions/


    Tutorials for StudioPress Themes.

    February 15, 2014 at 2:59 pm #90532
    drezac
    Member

    Thanks-

    It's the All Around WP Slider Carousel. It's fantastic, but hard to squeeze into this theme.

    http://www.shindiristudio.com/allaroundslider/?page_id=67

    I think you're spot on- the only problem I have, is that the theme I'm using has removed a lot of the Genesis hooks and added their own custom header stuff. You can see that code here: https://gist.github.com/drezac/f6915cb24202d04dc3a5

    This is what I was thinking:

    function all_around_slider_home() {
    if (is_home()) {
    echo do_shortcode('[all_around id="1"]');
    }
    };
    /**
    * @author Brad Dalton - WP Sites
    * @learn more http://wp.me/p1lTu0-9p4
    */
    add_action('I_dont_know_what_hook_to_put_here', 'all_around_slider_home');

    I feel like this is close....

    -Dan

    February 15, 2014 at 3:46 pm #90534
    drezac
    Member

    I added :

    function all_around_slider_home() {
    if (is_home()) {
    echo do_shortcode(‘[all_around id="1"]‘);
    }
    };
    /**
    * @author Brad Dalton – WP Sites
    * @learn more http://wp.me/p1lTu0-9p4
    */
    add_action(‘genesis_after_header’, ‘all_around_slider_home’);

    Still gets broken....

    February 15, 2014 at 4:29 pm #90538
    Brad Dalton
    Participant

    Looks like i resolved this on my site already http://wpsites.net/best-plugins/add-slide-deck-to-any-theme/


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble