Menu Close Menu
Menu
  • 0
    • Number of items in cart: 0

      • Your cart is empty.
      • Total: $0.00
      • Checkout
  • Pricing
    • Purchase Options
    • Individual Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Blog

KBS_ARTICLE_SLUG

KBS_ARTICLE_SLUG

Changing the post type slug for Knowledge Base articles

The KBS_ARTICLE_SLUG constant enables you to change the post type slug of the article post type.

By default the slug is article which means that URLs will look like http://yoursite.com/articles/ for the article archive and http://yoursite.com/articles/article-name for individual articles but by defining this constant within your theme’s functions.php file, or any custom plugin file, you can update the slug to be anything you want.

Example

By adding the following line into our themes functions.php file or any plugin, we can change our slug from articles to documents…

<?php define( 'KBS_ARTICLE_SLUG', 'documents' ); ?>

You need to re-save your permalink structure in order for the change to take effect. Go to Settings -> Permalinks and click Save Changes.

URLs will now look like http://yoursite.com/documents/ for the article archive and http://yoursite.com/documents/article-name for individual articles.


Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

KBS_ARTICLE_SLUG

The KBS_ARTICLE_SLUG constant enables you to change the post type slug of the article post type. By default the slug is article which means that URLs will look like http://yoursite.com/articles/ for the article archive and http://yoursite.com/articles/article-name for individual articles but by defining this constant within your theme's functions.php file, or any custom plugin file, you can update the slug to be…
KB Article rating: 5.0 based on 1 ratings
Constants Developer Docs Knowledge Base Last updated: 17/02/2017

Published by Cristian Raiber

Posts by Cristian Raiber

Post navigation

Previous

[kbs_tickets] Shortcode

Next

Configuring Easy Digital Downloads

Contact Details

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Developer Resources

Plugin Boilerplate

Trello Board

GitHub Repository

Ratings & Satisfaction Docs

  • Configuring Ratings and Satisfaction
  • Advanced Settings

Email Support Docs

  • Plugin Requirements
  • Configuring Email Support
  • Creating New Tickets
  • Replying to Closed Tickets
  • Anonymous Replies in Email Support
  • HTML Emails Tags
  • Email Commands
  • Defining IMAP Flags

KBS REST API Docs

  • Using the REST API
  • Tickets REST API Route
  • Replies REST API Route
  • Articles REST API Route
  • Agents REST API Route
  • Customers REST API Route
  • Companies REST API Route
  • Forms REST API Route
  • Form Fields REST API Route
  • Ticket Categories REST API Route
  • Ticket Departments REST API Route
  • Ticket Source REST API Route

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs
© 2023 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Privacy Policy
  • Discount Code