Skip to content

Commit

Permalink
Amend sidebar
Browse files Browse the repository at this point in the history
Fix bug where no post is present.
Set depth to 1.
  • Loading branch information
EarthlingDavey committed Feb 15, 2024
1 parent af7a866 commit 8b72fd6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/app/themes/justice/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
function sidebar_child_menu_List()
{
global $post;

if (!$post) {
return;
}

$page_args = [
'child_of' => $post->ID,
'depth' => 0,
'depth' => 1,
'exclude' => wp_get_post_parent_id($post->ID),
'title_li' => 0,
'post_status' => 'publish',
Expand Down

0 comments on commit 8b72fd6

Please sign in to comment.