Remove slider on home page
-
Hi Folks
I am just starting to get to grips with this amazing theme but have some questions please?
I would like to remove the Slider from just the home, (static) page but still show it on the blog page if that is possible.
Also I need to be able to remove the comments from the homepage as well but still allow them on the blog page.
Finally, (for the moment), I would like the initial posts on the blog page to be a short version of each post with a “read more” link to the full post, is this acheivable and if so I really would appreciate some advise.
http://www.blog.bigfish-littlefishuk.co.uk
Any ideas please?
Many thanks
DezD
Use
is_home()
conditional tag.2. Dashboard > Pages and Quick edit static front page and uncheck Allow comments.
3. Graphene Options > Display > Excerpts display options.
Hi Prasanna
many thanks for getting back to me, much appreciated.
I have created the php file as your suggest with the following coe:
<?php
function graphene_display_slider(){
graphene_slider();
add_action('wp_footer', 'graphene_scrollable');
}
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' );
function graphene_display_slider(){
if (is_single() || is_front_page()|| is_home()){
graphene_slider();
add_action('wp_footer', 'graphene_scrollable');
}
}
?>This does not remove the slider from the home page: http://www.blog.bigfish-littlefishuk.co.uk/ though. What am I doing wrong?
Hope to speak soon.
Thanks again
Deryn
Don’t put the same function twice. Try this,
<?php
function graphene_display_slider() {
if ( ! is_home() ) {
graphene_slider();
add_action('wp_footer', 'graphene_scrollable');
}
}
function custom_enqueue_scripts(){
if ( ! is_home() ) { // Front-end only
wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
}
}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );Oops! There shouldn’t be a
!
beforeis_home()
. This should work.<?php
function graphene_display_slider() {
if ( is_home() ) {
graphene_slider();
add_action('wp_footer', 'graphene_scrollable');
}
}
function custom_enqueue_scripts(){
if ( is_home() ) { // Front-end only
wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
}
}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );Hi Prasanna
That seems to be working perfectly, many thanks.
I’m afraid I know little if anything about php so this will be a steep learning curve, expect to hear lots from me I’m afraid as I’m a keen learner.
Just one thing, If I want to add the slider to other pages such as the blog page: http://www.blog.bigfish-littlefishuk.co.uk/blog/ how do I do that?
Speak soon
Deryn
Hmm.. That should actually put the slider on blog page. See http://codex.wordpress.org/Conditional_Tags#The_Main_Page
Okay, try this,
<?php
function graphene_display_slider() {
if ( is_page('blog') ) {
graphene_slider();
add_action('wp_footer', 'graphene_scrollable');
}
}
function custom_enqueue_scripts(){
if ( is_page('blog') ) { // Front-end only
wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
}
}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );
Viewing 10 posts - 1 through 10 (of 18 total)
- 1
- 2
- You must be logged in to reply to this topic.