Shortcodes in Home Page Settings

Discussion in 'SwiftRay WordPress Theme' started by gwindylyn, Apr 22, 2014.

Thread Status:
Not open for further replies.
  1. gwindylyn

    gwindylyn Member

    Joined:
    Mar 16, 2013
    Messages:
    47
    Likes Received:
    1
    Is there any way to make shortcodes work in the Home Page Content located in the Home Page Settings? I want to put a slider there with the slideshow plugin's shortcode.
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,
    When front page sidebar is in left side.
    Go to front-page.php present in your theme directory and replace current code

    Code:
    <p><?php echo stripslashes(get_option('inkthemes_homecontent')); ?></p> 
    with code given below

    Code:
     <p><?php echo do_shortcode(get_option('inkthemes_homecontent')); ?></p>
    check image for reference

    2014-04-22_1107.png


    Thanks & Regards
    Gourav Shrivastava
     
  3. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
    Hello,
    When front page sidebar is in right side.
    Go to the front-page.php file present in your theme directory and paste the code given below in that file as instructed in the image given below.

    Code:
    <?php echo stripslashes(do_shortcode(get_option('inkthemes_homecontent'))); ?> 
    [​IMG]

    This will solve your issue.
     
  4. gwindylyn

    gwindylyn Member

    Joined:
    Mar 16, 2013
    Messages:
    47
    Likes Received:
    1
    Thank you!
     
Thread Status:
Not open for further replies.

Share This Page