Skip to content
Tareq Hasan edited this page Jul 12, 2018 · 3 revisions

General Questions and Answers

I'm Getting 404 Error

weDocs uses Custom Post Type for storing the documentations. After installing the plugin often WordPress doesn't refresh the rewrite rules so we see the error.

To fix this problem, go to the Permalinks setting in WordPress (Settings > Permalinks) and hit Save Changes. The error should go away.

Permalinks Settings

Problems with private Docs

Every section and docs in weDocs has parent/child relationship and that’s how it maintains the relation when showing. Also, managing the relationship is done by WordPress.

So when you set a parent item in draft/pending mode, it can’t have any child element. So if you have a section in draft mode, it cannot have a child doc and you won’t see that in the sidebar.

sidebar

When you update, it falls back to another parent and the result becomes unexpected. There’s not much I can do about it.

I want to change the slug

If you don't want to use the default docs slug and want something else, e.g. documentation, you can use this code:

<?php

/**
 * Changing the `docs` slug to something else
 *
 * @param array $args 
 *
 * @return array 
 */
add_filter( 'wedocs_post_type', function($args) {

    $args['rewrite']['slug'] = 'documentation';

    return $args;
} );

Put this as a functionality plugin or in your themes functions.php

Clone this wiki locally