WordPress Plugins and Themes

Questions regarding Series plugin

6 Replies ·

  1. I installed Series.

    I’m using Gutenberg.

    I usually use Pages. Though I am open to switch my Pages to Posts if they work better with Series.

    I like to have a Series and within each individual article, there’s a way to link to the next or previous article in the series.

    And also show a list of other articles in the series even if the list is not a complete one, I believe this is a widget.

    However, the theme I use Twenty Nineteen doesn’t appear to work well with the widgets. They are not showing up.

    I’m also open to changing the theme if it makes things easier. In short, I like to have the path of least resistance in order to have the Series plugin working.

    However, what matters is that I can still use my Yoast premium plugin and Gutenberg editor both I highly enjoy using.

    My final question is can the same article show up in multiple series?

    Thank you.

    P.S.: I love your blog, Justin. And the way you organize your plugins, themes, and business around your work. I hope to emulate the style of your work though I’m more interested in the business webapp space rather than the Wordpress space.

  2. Justin Tadlock

    I usually use Pages. Though I am open to switch my Pages to Posts if they work better with Series.

    Series is meant to work only with posts. It’s possible to set up the taxonomy to work with pages. However, other aspects of the plugin may not be coded to work with pages. I typically code things to be pretty flexible, but I’ve never thought much about whether how well it’d work with pages. I recommend using it with posts simply because that’s what the plugin was intended for.

    However, if you must use it for pages, you can add the following code to a custom plugin file or your theme’s functions.php:

    add_action( 'init', function() {
        register_taxonomy_for_object_type( 'series', 'page' );
    } );
    

    I like to have a Series and within each individual article, there’s a way to link to the next or previous article in the series.

    WordPress allows you to define the taxonomy (series in this case) for the previous_post_link() and next_post_link() functions, which link to the prev/next post:

    Those would be outside of your post and placed in your theme template for displaying single posts. The only way to do that within a post is to have some build out some custom shortcodes for handling it.

    Here’s how you’d do that with code:

    <?php previous_post_link( '« %link', '%title', true, '', 'series' ); ?>
    
    <?php previous_post_link( '%link »', '%title', true, '', 'series' ); ?>
    

    And also show a list of other articles in the series even if the list is not a complete one, I believe this is a widget.

    However, the theme I use Twenty Nineteen doesn’t appear to work well with the widgets. They are not showing up.

    The “Series – List Related” widget will display related posts in a series only on the single post view and only if the given post is in a series. Otherwise, nothing is displayed.

    Twenty Nineteen’s only sidebar is in the footer. You’d definitely need to switch to a different theme if you wanted something on the side of the page. If you prefer a core theme, I’m partial to TwentyTen, Twenty Eleven, and Twenty Fifteen.

    My final question is can the same article show up in multiple series?

    Sure. It’s really not much different from a category or tag.

  3. kimsia sim

    Hi Justin,

    Thanks for reply.

    1. I will switch to posts
    2. Do the other themes work well with Gutenberg? I like how Twenty Nineteen is clean like Medium with just one big featured picture at the top and is mobile responsive.

    Does that help to narrow my options down?

    Or you have some existing Hybrid themes here that work well with Series. I am willing to experiment since my traffic is low.

    I want to do things right where possible

    Thank you

  4. Justin Tadlock

    All themes should work fine with the Series plugin. There’s not really much overlap between the plugin and themes other than perhaps where a theme has a sidebar if you want to display widgets.

    Most themes should technically work with Gutenberg. Not all themes have custom designs for Gutenberg’s blocks and would fall back to the default.

    Basically, what I’m getting at is that neither Series nor Gutenberg should really dictate what theme you decide to use. I’d say just test out lots of different themes and choose something that fits the idea you have in mind for your site. If you have a need for a left/right sidebar on the page, several of the Twenty* themes do that. The Stargazer theme does that too.

  5. kimsia sim

    The only way to do that within a post is to have some build out some custom shortcodes for handling it.

    So where do I paste the code? inside the theme index.php?

    UPDATE:

    Please ignore the above. The twentyfifteen theme apparently will auto do this. So all’s well. Thanks

  6. kimsia sim

    Another question I have is:

    Suppose the same post appears in two different series.

    When I go to the post’s own page, which prev and next link will it show? Is it possible to show different prev and next link depending which series the post is seen from?

    Would that mean I need to have two different urls for the same post?

    e.g.

    domain.com/post-slug?series=series_1_id
    domain.com/post-slug?series=series_2_id

  7. Justin Tadlock

    Ultimately, WP will pass all of this to get_boundary_post(), which will grab all the terms (series) for the post and query the prev/next posts based on that.

    As for multiple prev/next links, it’d require a custom-built solution. WP’s functions simply were not built for such a scenario.


    While I did say that it was possible to put a single post in multiple series, that’s not the intention of the plugin. If WP currently handled a taxonomy meta box that only allowed users to select a single term, I would definitely have done so with this plugin. Generally speaking, an item should only belong to one series.

    If it’s such a common thing that you need to put multiple posts into multiple series, I wonder if your content’s architecture might need to be re-planned. Depending on whatever it is you’re doing, it may be that you need multiple taxonomies.