Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #54322
    Jürgen
    Member

    Hi,

    im using the catch base theme without the featured content slider. Yet, on my three column homepage i would like to place a slider (i am using the Huge IT Slider plugin) which spans the three columns and is placed right below the menu. I thought i could do this by placin shortcode in the promotion headline but that didnt work. Is there a way to accomplish this? Or can i use featured images for the slider but not display them on the content pages?

    Thanks in advance

    #54389
    Sakin
    Keymaster

    @ghostzapper: It depends on the slider code for the template/php functions. So, first you need to build child theme. For Child theme, check out http://catchthemes.com/blog/create-child-theme-wordpress/

    Then you can add the following code in your child theme functions.php file. In the following replace your shortcode [huge_it_portfolio id=N] with your shortcode

    /**
     * Add Huge Slider.
     *
     * @uses action hook catchbase_before_content.
     *
     */
    function catchbase_huge_slider() {
    	echo do_shortcode([huge_it_portfolio id=N]);
    }
    add_action( 'catchbase_before_content', 'catchbase_huge_slider', 10 );
    #54951
    Jürgen
    Member

    Thank you Sakin.

    Do i have to copy the functions.php to the child theme folder and add thge code above or do i simply put this code inside an otherwise empty functions.php?

    – edit: problem solved, i just read the article about creating a child theme 😉 –

    Thank you again,

    Juergen

    #54964
    Sakin
    Keymaster

    @ghostzapper: Good that is solve. Yes, you just need to paste that code in your child theme functions.php file

    #55395
    Jürgen
    Member

    Hi,

    i created a slider and pasted the above code into a functions.php and added a <?php before it. It gives the folowing error:
    Parse error: syntax error, unexpected ‘id’ (T_STRING), expecting ‘]’ in /is/htdocs/wp11222441_N7WKCZN3QW/www/wp-content/themes/catch-base-child/functions.php on line 9

    Any suggestions?

    #55551
    Sakin
    Keymaster

    @ghostzapper: Fist, did you check out how to build child theme and also download sample child theme from http://catchthemes.com/blog/create-child-theme-wordpress/. You will find functions.php file in that child theme. Just add the above code in that functions.php file. You don’t need to add php as it’s already there in functions.php file. Also you need to replace [huge_it_portfolio id=N] with your ID where it’s N.

    #57566
    Jürgen
    Member

    can’t seem to get it to work, i’ll just leave it alone 🙂 Problem solved

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Shortcode in promotion headline?’ is closed to new replies.