WordPress.org

Ready to get started?Download WordPress

Forums

Nemus Slider
[resolved] Events category (15 posts)

  1. ernestp
    Member
    Posted 5 months ago #

    I'm trying to make automated slides based on the events posts I've made but when I preview I just get a big blank space on the preview page. On top of that, even when I choose the Events post type, the Categories available are only those from my Posts post type.

    I'm probably in over my head here, and it's probably due to a theme incompatibility that I lack the ability to fix. (Churchope theme)

    My site is http://woodriverlibrary.org/ I'm just trying to make a little horizontal carousel thing to show some book covers. Each event I made has a book cover used as the featured image.

    Thanks for any reply

    https://wordpress.org/plugins/nemus-slider/

  2. passatgt
    Member
    Plugin Author

    Posted 5 months ago #

    Hi!

    Can you specify where exactly is the slider on the page? I don't see it anywhere, just the main slider which is not Nemus Slider. Maybe you can create a new page with only the slider on it so i can see it in live.

    Also, a screenshot would be nice to see how things are setup in the slider settings.

    Thanks

  3. Flyhead
    Member
    Posted 5 months ago #

    This is a very promising slider. Thank you for sharing it.

    I am new to WordPress and php, so please bear with me if these questions seem silly. Do you think it is possible to use a php code to link a certain slider in a template? Is it possible to give a custom css style to the .slide and the .caption class by creating a css file within this plug-in folder? I look forward to your response.

  4. passatgt
    Member
    Plugin Author

    Posted 5 months ago #

    Hi!

    You can use the <?php nemus_slider(12); ?> function to display the slider inside a theme code. Only one parameter which is the slider id. If you don't specify an ID, it will display the most recent slider you created.

    You can overwrite the CSS in your themes styles.css file, or alternatively create a nemus-slider.css file in your theme folder which will be loaded automatically if its available.

  5. Flyhead
    Member
    Posted 5 months ago #

    Hello, thank you fro immediate reply. So I guess I'll just put down <?php nemus_slider(12); id="id_number"?> where I want in the template and that's it? That will be wonderful.

  6. passatgt
    Member
    Plugin Author

    Posted 5 months ago #

    Yep, thats it. The php code is the same as the shortcode, which looks like this:

    [nemus_slider id="4"]

    The same with php is

    <?php nemus_slider(4); ?>

  7. Flyhead
    Member
    Posted 5 months ago #

    Great! Thanks. I hope I can return in a few days to tell you I have been successful in using your wonderful plugin.

  8. ernestp
    Member
    Posted 5 months ago #

  9. passatgt
    Member
    Plugin Author

    Posted 5 months ago #

    Hi!

    Yes, its a CSS issue, your theme's overwrite a couple of styles in the slider. Please use the following css code somewhere in your theme options or css files to fix the issue:

    .nemus-slider li {padding:0 !important;background:none !important;}
    .nemus-slider li:before {display:none !important;}
    .nemus-slider h1 {color:#fff !important;}

  10. ernestp
    Member
    Posted 5 months ago #

    Wow, that did it. So it is visible now. Thank you so much! Now my only problem is when I am editing a Slider and I change my Post Type to anything other than Posts, it still only shows Post Categories.

    Here's a link to what I'm talking about...those are categories of Posts. Is this plugin intended to do other categories?

  11. passatgt
    Member
    Plugin Author

    Posted 5 months ago #

    Yes, the category selector is only for the default Posts, not for custom post types.

    However, you can modify the query easily to suit your needs, use this in your functions.php file:

    add_filter('nemus-slider-auto-slide-query','nemus_slider_event_categories',10,2);
    function nemus_slider_event_categories($args, $id) {
        //Only if its your slider
        if($id=='3093')
            $args['event_categories'] = 'categoryslug';
        }
        return $args;
    }

    I'm not sure which plugin are you using for the events, so you need to look up the taxonomy name for your event categories and change 'event_categories' to the correct one. Where you manage your event categories, you can see it in the url in your browser(...edit-tags.php?taxonomy= event_categories for example).

  12. ernestp
    Member
    Posted 5 months ago #

    Well, it was th_event_cat and I put it in there but still couldn't get it to work. This is all way above my level of understanding but thank you for all of your help and hard work.

  13. passatgt
    Member
    Plugin Author

    Posted 5 months ago #

    Its not that hard, make sure you create a new automated slide with the Events post type selected, leave the other fields default, then add the code above to your functions.php file, change 'event_categories' to 'th_event_cat' and the 'categoryslug' to your category name, for example 'open-minds-book-club'

  14. ernestp
    Member
    Posted 5 months ago #

    I stuck this at the bottom, just before the closing php statement thing.

    add_filter('nemus-slider-auto-slide-query','nemus_slider_event_categories',10,2);
    function nemus_slider_event_categories($args, $id) {
        //Only if its your slider
        if($id=='3093')
            $args['th_events_cat'] = 'open-minds-book-club';
        }
        return $args;
    }

    It still had no effect!

  15. ernestp
    Member
    Posted 5 months ago #

    And it actually is "events", not "event" as I previously had said.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.