How to place the slider on the top-right-sidebar?
-
Hello,
I’m wondering about the easiest way to resize and place the slider window under the menu bar on the top-right-sidebar?
I also would like to place the search form in the menu bar, like it is made here: https://forum.graphene-theme.com
How to make these changes?
Thank you
AdminQuote:I’m wondering about the easiest way to resize and place the slider window under the menu bar on the top-right-sidebar?Take a look at this topic:
https://forum.graphene-theme.com/graphene-support/extended-slider-problem#post-20868
Quote:I also would like to place the search form in the menu bar, like it is made here: https://forum.graphene-theme.comHow to make these changes?
Go to Graphene Options > Display > Header Display Options > Search box location.
I’m back!
I tried what you suggested in the other post but this makes the slider as large as the container! I just would like it as a small quared box as large as the right slide bar, like in this theme:
http://utilitydemo.blitzthemes.com
By the way, I like the cleanes of that theme but I prefer Graphene for its customizable features. Is there a way to make Graphene looks like that theme with the following customs:
– slider box on top-right side bar (exactly as in the other theme)
– similar ticker (top-left) ?
I tried the ticker you posted in it give a large vertical window! I’d rather prefer a light simple ticker!
PS: you can remove the theme link if you don’t want it to appear here. I just post it to let you know what I would like to have in Graphene, my favorite theme so far.
Regards,
AdminChange
graphene_before_content-main
tographene_before_sidebar1
. Make sure you adjust the widths as well.Thank you Syahir, but I’m sorry, it didn’t work!
Here is how I proceed:
– Copy/paste in the functions.php (of Graphene them) the following codes:
/**
* Move slider to outside of the #content-main div
*/
function graphene_move_slider(){
global $graphene_settings;
if ( ! $graphene_settings['slider_position'] ){
remove_action( 'graphene_top_content', 'graphene_display_slider' );
add_action( 'graphene_before_content-main', 'graphene_display_slider' );
} else {
add_action( 'graphene_bottom_content', 'graphene_display_slider' );
}
}
add_action( 'template_redirect', 'graphene_move_slider' );
/**
* Adjust the width of the slider container
*/
function graphene_resize_slider(){
$width = graphene_grid_width( '', 16 );
echo '<style type="text/css">.featured_slider, .slider_post {width: ' . $width . 'px !important;}</style>';
}
add_action( 'wp_head', 'graphene_resize_slider', 1000 );
/**
* Adjust the slider's background image width
*/
function graphene_resize_slider_image_width( $width ){
return graphene_grid_width( '', 16 );
}
add_filter( 'graphene_slider_image_width', 'graphene_resize_slider_image_width' );– Then copy/paste in style.css (of Graphene) the following values:
.featured_slider {
margin-left: 10px;
}Then, I changed the width value from 1000px to 200px, but this didn’t result in the expected change!
What it is going wrong?
AdminWhen pasting code into this forum, put them inside backticks (
Code:`), not
Code:[quote]. I’ve edited your post for this.
As for your issue, you haven’t replaced
graphene_before_content-main
withgraphene_before_sidebar1
.Sorry for the wrong quote! Now I know how to do post the code correctly, though I prefer the light background, rather than black one!
For the issue, I did replaced the code and reduced the width, but, I can’t access the website anymore, with this error:
Fatal error: Cannot redeclare graphene_move_slider() (previously declared in C:wampwwwwp-contentthemesgraphenefunctions.php:22) in C:wampwwwwp-contentthemesgraphenefunctions.php on line 81.
Is there any “prefered” place to put the code or we can place it at any position ?
(I pasted it inside the PHP code).
AdminYou need to use a child theme for this. Don’t edit the theme’s files.
Viewing 10 posts - 1 through 10 (of 13 total)
- 1
- 2
- You must be logged in to reply to this topic.