Speed up your Oxygen workflow

with Swiss Knife Pro

A true Enhancer of Oxygens Builder Experience 
Lifetime Deal Only $40

Add hierarchy option to posts

If you need to have a parent option for any post custom post to organize inside the admin menu or to loop all child post for some post id just add this code snippet to functions.php

Page attributes options example

add_filter( 'register_post_type_args', 'add_hierarchy_support', 10, 2 );
function add_hierarchy_support( $args, $post_type ){

    if ($post_type === 'post' || $post_type === 'docs') { // <-- enter desired post type here

        $args['hierarchical'] = true;
        $args['supports'] = array_merge($args['supports'], array ('page-attributes') );

    return $args;

If you need help with custom scripts or you are not skilled enough to implement something from the tutorial?


Stay up to date with latest post and updates.