Support » Plugin: CC Child Pages » CSS hook for current page

  • Resolved Eric3D

    (@eric3d)


    When using show_current_page, I would like a CSS hook so I can highlight the current page in the list. The following additions seem to work and I would like to see them integrated in the next version.

    beginning of public static function show_child_pages( $atts ):

    global $post;
    $current_id = $post->ID;

    in the loop (around line 360):

    if ( $id == $current_id ) {
    	$page_class .= ' cccurrent';
    }

    Thanks.

    https://wordpress.org/plugins/cc-child-pages/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author caterhamcomputing

    (@caterhamcomputing)

    Hi Eric … sorry not to have replied sooner but I’ve not been around for a while.

    This is a great idea and I’ll certainly look at adding this functionality to the next release, and I will look at adding other CSS hooks for parent, sibling, etc. while I am at it.

    Thanks for your input.

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    The new version of the plugin has just been released.

    The classes active, current-page and cccurrent are now added to the childpage <div> when displaying the current page.

    I hope that this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS hook for current page’ is closed to new replies.