Organize Series Shortcodes

Below, you’ll find a detailed guide on how to add the Organize Series Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Organize Series Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Organize Series Plugin and the shortcodes it provides:

Plugin Icon
Issues and Series for Newspapers, Magazines, Publishers, Writers

"Issues and Series for Newspapers, Magazines, Publishers, Writers is a comprehensive WordPress plugin. It aids in organizing editorial content into series or issues, offering a streamlined publishing process."

★★★★✩ (58) Active Installs: 3000+ Tested with: 6.3.2 PHP Version: 7.2.5
Included Shortcodes:
  • [publishpress_series_categories]
  • [publishpress_series_toc]

Organize Series [publishpress_series_categories] Shortcode

The PublishPress Series Categories shortcode is a powerful tool that allows you to retrieve and display series groups based on specific category IDs or series IDs. This shortcode accepts two parameters: ‘category_ids’ and ‘series_ids’. By feeding it the desired IDs, you can customize the output to fit your content needs.

Shortcode: [publishpress_series_categories]

Parameters

Here is a list of all possible publishpress_series_categories shortcode parameters and attributes:

  • category_ids – Specifies the category IDs to include in the series group.
  • series_ids – Defines the series IDs to include in the series group.

Examples and Usage

Basic example – The following shortcode example demonstrates the most basic usage of the ‘publishpress_series_categories’ shortcode. It doesn’t specify any category or series IDs, so it will return a list of all series groups.

[publishpress_series_categories]

Advanced examples

Specifying a single category ID – This example demonstrates how to use the ‘publishpress_series_categories’ shortcode to list series groups from a specific category. Here, ‘category_ids’ attribute is set to ‘3’, so it will return series groups from the category with the ID of 3.

[publishpress_series_categories category_ids=3]

Specifying multiple category IDs – This example shows how you can specify multiple category IDs by separating them with commas. The ‘category_ids’ attribute is set to ‘2,4,6’, so it will return series groups from the categories with the IDs of 2, 4, and 6.

[publishpress_series_categories category_ids="2,4,6"]

Specifying a single series ID – In this example, the ‘series_ids’ attribute is used to specify a single series ID. It’s set to ‘5’, so it will only return the series group with the ID of 5.

[publishpress_series_categories series_ids=5]

Specifying multiple series IDs – This example demonstrates how to specify multiple series IDs. The ‘series_ids’ attribute is set to ‘1,3,5’, so it will return the series groups with the IDs of 1, 3, and 5.

[publishpress_series_categories series_ids="1,3,5"]

Combining category and series IDs – This example shows how you can combine both ‘category_ids’ and ‘series_ids’ attributes. It will return series groups from the categories with the IDs of 2 and 4, and the series with the IDs of 1 and 3.

[publishpress_series_categories category_ids="2,4" series_ids="1,3"]

PHP Function Code

In case you have difficulties debugging what causing issues with [publishpress_series_categories] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('publishpress_series_categories', 'publishpress_series_groups');

Shortcode PHP function:

                    function publishpress_series_groups($atts)
{
	$default_atts = array(
		'category_ids'  => '',
		'series_ids'    => ''
	);
	
    $args = shortcode_atts($default_atts, $atts);

    return get_series_group_list($args['category_ids'], $args, false);
}
                    

Code file location:

organize-series/organize-series/addons/grouping/legacy-includes.php

Organize Series [publishpress_series_toc] Shortcode

The PublishPress Series TOC shortcode is a functional snippet that generates a table of contents for a series. It neatly organizes and displays the series list and pagination.

Shortcode: [publishpress_series_toc]

PHP Function Code

In case you have difficulties debugging what causing issues with [publishpress_series_toc] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('publishpress_series_toc', array($this, 'publishpress_series_toc_shortcode'));

Shortcode PHP function:

                    function publishpress_series_toc_shortcode($atts) {
        ob_start();
        ?>
        <div id="series-content">
            <?php wp_serieslist_display(); ?>
            <div class="stocpagination">
                <?php series_toc_paginate(); ?>
            </div>
        </div>
        <?php

        return ob_get_clean();
    }
                    

Code file location:

organize-series/organize-series/orgSeries-setup.php

Conclusion

Now that you’ve learned how to embed the Organize Series Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *