• Resolved nkatz

    (@nkatz)


    I’ve installed a slideshow plugin and I’m trying to place the slideshow in the main Homepage content area. The ‘Insert Slideshow’ button shows up in the Theme Options’ Homepage Content editor bar, I click it and it inserts the slideshow’s shortcode, then I save changes (obviously).

    The problem is that the slideshow doesn’t show up on the site – only the shortcode, itself, as standard text.

    Does DK Responsive support shortcodes in that field? I assumed that it does else WordPress wouldn’t have allowed the ‘insert slideshow’ button to appear there, no?

    How can I get my slideshow to appear in the Homepage Content area?

    Thanks in advance!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi there nkatz!

    Taking a quick look at how the theme is structured shows me that at one point it did have some support for shortcodes.

    It has:

    $home_page_content =  wp_kses_post( $home_page_content );
    // apply_filters( 'the_content', $home_page_content);
    //$home_page_content = do_shortcode( $home_page_content ); // CHANGED HERE
    //$home_page_content = apply_filters('the_content', $home_page_content);
    echo'<div>'.$home_page_content.'</div>';

    That is taken from the home-area.php template. From a support point I would tell you to make a child theme and change those lines so you won’t lose those changes when the them updates. As a theme reviewer I am a little worried as to how this may transfer over because all themes need to be using the customizer for their theme options… Sorry I nearly began reviewing the whole theme – I tend to get carried away with those. ??

    So, as for the code!

    In the mean time you can uncomment the line:

    //$home_page_content = do_shortcode( $home_page_content ); // CHANGED HERE

    While this is a terrible, terrible way of achieving this it does work. Unfortunately because of the way the theme is coded it makes it super hard to actually make a child theme of it without having to create all sort of files, which I’m not a fan, and am sure you’re not a fan of doing as well.

    I hope this somewhat helps you out!

    Thread Starter nkatz

    (@nkatz)

    Hello, Jose! And thanks for having a look at this.

    I am, in fact, already using a child theme so do I create a file called home-area.php and put just the section of code you’ve provided above in it? Or do i need to duplicate the entire file from the parent theme and then un-comment the appropriate line?

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hey nkats,

    You would duplicate the file and uncomment the appropriate line. ??

    Thread Starter nkatz

    (@nkatz)

    Huzzaahhhhh!! It works….and THANK YOU! ??

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Awesome!

    Happy to help! ??

    Hello,

    I removed the sidebar however I cannot make the content use its area. No sidebar but the is an empty area.

    You can look from here:
    https://www.whygeneration.com.tr/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Shortcodes in Homepage Content area’ is closed to new replies.