Return to Support

Moving the slider into the middle of the page?

Home Forums Graphene WordPress theme Support Moving the slider into the middle of the page?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9288
    Venutius
    Member

    I am trying to move the graphene slider so that it is the middle of the content in a page, is this possible, or should I just look for a different slider for my posts?

    I’ve been following this post:

    https://forum.graphene-theme.com/graphene-support/how-do-i-place-a-graphene-slider-a-page-with-a-short-link-or-code/page/2

    I’ve created a child theme, and have put the short code feature into the functions.php, but I’m not sure which file I would put the action hook code into, it clearly fails in functions.php

    But also, I do not see any action hooks that would put it into the middle of a contend block. Any suggestions would be greatly appreciated.

    #43245
    Anonymous
    Member

    I don’t know but maybe this helps you getting closer to what you are looking for.

    This is a list of action hooks in the graphene theme. I don’t know where you should add the code though since you want the slider inbetween articles on the front page.

    http://docs.graphene-theme.com/Actions_Reference

    What is the exact code you are using?

    #43246
    Venutius
    Member

    Yes I’ve looked at that thanks

    This is the code I’m trying to use:

    function custom_move_graphene_slider() {
    remove_action( 'graphene_top_content', 'graphene_display_slider' );
    add_action( 'graphene_action_hook', 'graphene_display_slider' );
    }

    add_action( 'template_redirect', 'custom_move_graphene_slider' );

    But the author does not say where it should go.

    #43247

    Put code in between backtick (

    Code:
    `

    ) characters. It’s usually located above the Tab key on your keyboard.

    That is a custom function which should go in your child theme’s functions.php file. Be sure to change graphene_action_hook to the name of the actual action hook you want to use.

    #43248
    Venutius
    Member

    When I do that, I just get the following error:

    Code:
    function custom_move_graphene_slider() { remove_action( ‘graphene_top_content’, ‘graphene_display_slider’ ); add_action( ‘graphene_after_page_content’, ‘graphene_display_slider’ ); } add_action( ‘template_redirect’, ‘custom_move_graphene_slider’ );

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/14/d69811276/htdocs/clickandbuilds/SacredVale/wp-content/themes/graphene-child/functions.php:25) in /homepages/14/d69811276/htdocs/clickandbuilds/SacredVale/wp-admin/post.php on line 235

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/14/d69811276/htdocs/clickandbuilds/SacredVale/wp-content/themes/graphene-child/functions.php:25) in /homepages/14/d69811276/htdocs/clickandbuilds/SacredVale/wp-includes/pluggable.php on line 1121

    #43249
    Venutius
    Member

    I’ve set up a test system at http://www.sacredvale.org it is the homepage I’m trying to modify, I would like the top slider to appear below the register now test box. Do you think that is possible for a novice to do?

    #43250

    The “headers already sent” error means there’s an error in your functions.php file—most likely a space before the opening <?php tag or after the closing ?> tag. It doesn’t mean there’s an error in any of your custom functions.

    See this post

    Troubleshoot your WordPress Blog

    for more information.

    #43251
    Venutius
    Member

    ok, well I do not get any errors anymore, but no matter which action hook I use the slider stays where it is. It’s a shame the short code option does not display the banner where the short code is put. The graphene slider is a very good implementation, a lot of the sliders out there are just rubbish.

    I think I can just about get away with what I’m looking to do by using an rss feed slider of my own rss lol, it’s the only working slider that does not look naff or have weird ways of transitioning content.

    #43252
    Quote:
    ok, well I do not get any errors anymore, but no matter which action hook I use the slider stays where it is.

    Do you have anything else in your child theme’s functions.php file?

    #43253
    Venutius
    Member

    I’ve the code to create the graphene shortcode, and when testing this I have the code to move the location of the slider, that’s it.

    #43254
    Anonymous
    Member

    You want the slider between posts on the front page, right?

    Example:

    Post 1

    Post 2

    Slider

    Post 3

    Post 4

    Correct?

    #43255
    Venutius
    Member

    I would like it to appear below two text blocks and before two shortcodes that I’ve got for pulling in other info.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.