how do i Place a Graphene slider a page with a short-link or code?
-
Add the below code to Graphene Child theme‘s functions.php file. `[graphene-slider] will be the short-code to display Graphene Slider. You can see it here. I’ve added slider within a post.
<?php
function graphene_slider_custom_shortcode() {
if (function_exists('graphene_slider')) {
graphene_slider();
}
}
add_shortcode('graphene-slider', 'graphene_slider_custom_shortcode');
function custom_enqueue_scripts(){
if ( ! is_admin() ) { // Front-end only
wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
}
}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );
?>Don’t put it in parent theme’s functions.php file. Search around the forum for more information on child theme, or visit my site.
Quote:is there a way to make a child theme without messing up the current graphene setup?It depends on what customizations you’ve done to parent theme. Though you’ll not lose anything by activating the child theme.
Graphene Child Theme Template http://www.prasannasp.net/graphene-child-theme-template/
i i got it to work but how do i control that there will only be one slider on the front page and that slider will be the one generated from the short code and not from the theme hence allowing me to control the position (theoretically) also how do i control the position of this slider?
Heres the link to the site i need help in
thank you,
AT
Viewing 10 posts - 1 through 10 (of 12 total)
- 1
- 2
- You must be logged in to reply to this topic.