Custom Post Types in Slider

  • mprysyaz

    #4285

    Hi! First of all, big thanx for the great theme. And here is my question:

    I have created custom post type “books”. How can I change the slider to show “books” instead of “post”

    ronangelo

    #27806

    Graphene Theme Options

    ->

    Slider Options

    ->

    What do you want to show in the slider

    ->

    Show specific posts/pages

    Go to posts on dashboard and hover the mouse on “books” post.

    you’ll see an address on the statu bar.

    ex.yoursite.com/wp-admin/post.php?post=9&action=edit

    in the example.. “9” is your post ID

    mprysyaz

    #27807

    Hi! Thank you for this tip. But I have already tried to use this option of slider. I have provided ID of the post and saved all other options not changed. Slider is empty. 🙁

    ronangelo

    #27808

    Post your site URL

    mprysyaz

    #27809

    Hi! Here is link to my test web site: http://musicnow.pl/

    As you can see there is “Books” page for all books items.

    Admin

    Syahir Hakim

    #27810

    You would need to create a child theme first for this. See here for instructions:

    http://wiki.khairul-syahir.com/graphene-theme/wiki/Customisation_using_a_child_theme#How_to_create_a_child_theme

    Post back again when you’ve created a child theme, or if you need any help doing that.

    mprysyaz

    #27811

    Hi Syahir,

    I have already created child theme. I have created folder and styles.css file for it. Do I need to make some php files for it?

    Admin

    Syahir Hakim

    #27812

    Yes, make a functions.php file in your child theme and add this code:

    <?php
    /**
    * Modify the post types to be displayed in the slider
    */
    function graphene_slider_post_type(){
    return array( 'post-type' );
    }
    add_filter( 'graphene_slider_post_type', 'graphene_slider_post_type' );

    Replace post-type with the post type you want to be displayed in the slider.

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

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!