WordPress.org

Plugin Directory

Kocuj Sitemap

Display a sitemap by shortcode, widget or PHP function. Multilingualism (qTranslate, qTranslate X plugins) is supported. WP and WP Multisite.

IMPORTANT INFORMATION: From version 2.3.0 support for qTranslate plugin will be dropped. Only qTranslate X plugin will be supported.

Kocuj Sitemap plugin adds shortcode [KocujSitemap] that puts the sitemap in the place where it is located. This allows you to display links to all of your posts, pages, menu items, authors, tags and custom types entries anywhere on your website - even within the article. There is also a PHP function that allows you to place the sitemap anywhere on the website. There is also possibility to use the widget to place a sitemap anywhere in the sidebar.

This plugin supports multilingual websites. If you have installed the plugin compatible with Kocuj Sitemap plugin (currently it is qTranslate and qTranslate X), the plugin will generate a sitemap on your website in accordance with the currently selected language. If you do not have the plugin that supports multilingualism, Kocuj Sitemap plugin will display a sitemap for the default language defined for your WordPress installation.

The sitemap is automatically generated and stored in the cache, which is used in the sitemap to avoid using the database when loading your website, after each change of any element in the administration panel (for example, when you change a post). This process speeds up the loading of the sitemap on your website.

The Kocuj Sitemap plugin can be used in standard or in multisite WordPress installation.

Features

  • Compatibility with HTML 5,
  • Multilingual websites support (with qTranslate and qTranslate X plugins),
  • Fast operation due to use of the cache,
  • Displaying posts, pages, menu items, authors, tags and custom types entries (with custom taxonomies),
  • Displaying all elements with dividing it by sections or without it,
  • Ability to change order of displayed entries,
  • Ability to exclude selected entries,
  • Easily adding of the sitemap by using a shortcode with help of HTML or visual editor button,
  • Possibility to set left margin for each level in multi-level sitemap if theme has problems with displaying such a list,
  • Many configuration options,
  • Many filters for better control of the plugin.

Requirements

This plugin requires PHP 5 (from 5.3.x, tested up to 5.6.x) or PHP 7 and WordPress 4.5 or greater. It works in standard and multisite WordPress environments. It is strongly recommended to use WordPress in the newest version.

How to use

There is possibility to use a shortcode [KocujSitemap] inside a post of any type, to use the PHP function anywhere or to display a widget.

The shortcode [KocujSitemap] has optional parameters:

  • homelinktext - text that will be used as the text for the link to the main page,
  • class - name of the style sheet class that will be added to the block element (div or nav) containing the entire sitemap,
  • excludepost - comma separated list of identifiers for posts of any type (posts, pages, custom types entries) to exclude,
  • excludecategory - comma separated list of identifiers for post categories to exclude,
  • excludeauthor - comma separated list of identifiers for authors to exclude,
  • excludeterm - comma separated list of identifiers for post categories, post tags or custom taxonomies to exclude.

For example, if you add:

[KocujSitemap homelinktext="NEW LINK TEXT" class="new_class"]

the sitemap will be displayed in the block element (div or nav) with the CSS class new_class and link to the home page with text NEW LINK TEXT.

If you add other parameters, for example:

[KocujSitemap homelinktext="NEW LINK TEXT" class="new_class" excludepost="5,6" excludeterm="12"]

the sitemap will be displayed in the block element (div or nav) with the CSS class new_class, link to the home page with text NEW LINK TEXT and there will be not displayed posts of any type with identifiers 5 and 6 and post tags and custom taxonomies with identifier 12.

Instead of using the shortcode, you can edit the PHP file responsible for the theme. Kocuj Sitemap plugin defines global PHP function which declaration is as follows:

<?php function kocujsitemap_show_sitemap($homeLinkText = '', $class = '', array $exclude = array()); ?>

The parameters $homeLinkText and $class perform the same function as the corresponding parameters in the shortcode [KocujSitemap]. For example, if you add:

<?php kocujsitemap_show_sitemap('NEW LINK TEXT', 'new_class'); ?>

the sitemap will be displayed in the block element (div or nav) with the CSS class new_class and link to the home page with text NEW LINK TEXT. More things should be sayed about $exclude parameter. It should contains an array of identifiers categorized (with correct key identifier) by entry type to exclude. There are the following entries types available:

  • post - for excluding posts of any type (posts, pages, custom types entries),
  • category - for excluding post categories,
  • author - for excluding authors,
  • term - for excluding post categories, post tags or custom taxonomies.

For example, the $exclude array:

$exclude = array('post' => array(5, 6), 'term' => array(12));

will exclude posts of any type with identifiers 5 and 6 and post tags and custom taxonomies with identifier 12.

There is also possibility to use widget. It has also the possibility to exclude selected elements from the sitemap.

Configuration

There is option Sitemap in the administration panel, which is used to configure the behavior of the Kocuj Sitemap plugin. If you select any submenu item from the Sitemap menu, you will find yourself in a place where you can set specific options for the plugin.

The settings on each administration page are divided into tabs. There can be active only one tab at once. Tab is selected by clicking on its name.

Each tab contains a set of options. Each option has a description that is displayed when you set mouse cursor over it. You can also see more detailed information by clicking a Help button on top of the page.

Changes in the configuration can be saved by clicking on the Save settings button. There is a possibility to restore the settings that were set after installing the plugin, by selecting an option Restore settings in the plugin menu.

Remember, that removing the plugin will clean all its options saved into the database.

CSS classes

The Kocuj Sitemap plugin displays a sitemap using a few CSS classes, so you can customize the look of the sitemap to your requirements.

There are the following CSS classes available:

  • kocujsitemap - used by main container for the sitemap (nav or div) in shortcode, PHP function and widget,
  • kocujsitemapwidget - used by main container for the sitemap (nav or div) in the widget,
  • kocujsitemap-home - used by <li> element in the sitemap when the link is to the home page,
  • kocujsitemap-post - used by <li> element in the sitemap when the link is to the post of any type (post, page, custom type entry),
  • kocujsitemap-category - used by <li> element in the sitemap when the link is to the post category,
  • kocujsitemap-term - used by <li> element in the sitemap when the link is to the post tags or custom taxonomy,
  • kocujsitemap-author - used by <li> element in the sitemap when the link is to the author,
  • kocujsitemap-unknown - used by <li> element in the sitemap when the link is to something different than all above (for example, link to other website).

Planned features

  • Generating one sitemap for all blogs in multisite installation,
  • Creating more than one sitemap,
  • Easy control of shortcode parameters in HTML and visual editor,
  • Generating XML sitemap for search engines.

You can also suggest a feature by sending a message to dominik@kocuj.pl .

Contact

If you have any suggestion, feel free to email me at dominik@kocuj.pl .

If you want to have a regular information about this plugin, please become a fan of plugin on Facebook: http://www.facebook.com/kocujsitemap

See also official plugin website: http://kocujsitemap.wpplugin.kocuj.pl

Requires: 4.5 or higher
Compatible up to: 4.6
Last Updated: 4 days ago
Active Installs: 2,000+

Ratings

4.7 out of 5 stars

Support

1 of 2 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0 100,1,1
0,1,0
100,1,1