• Is there any way to assign sibling / child / parent as classes?
    I’m working with custom post types (edited the code, see post below) but the only classes that show are the current_page_item sb_cl_current_page, can you make it so that siblings get a class of siblings, children get a class of children, and parents get the class of parents? The option menu only allows setting children and siblings together under children, and the parent option does not work.

    https://www.ads-software.com/extend/plugins/sb-child-list/

Viewing 1 replies (of 1 total)
  • Thread Starter pinktank

    (@pinktank)

    added parent class here, line 837

    if ($instance['show_parent_link']) {
    			global $post;
    			if ($parent = $post->post_parent) {
    				if ($parent = get_post($parent)) {
    					echo '<h5><a href="' . get_permalink($parent->ID) . '" class="parent">' . $parent->post_title . '</a></h5>';
    				}
    			}
    		}
Viewing 1 replies (of 1 total)
  • The topic ‘Post-class not useful, assign sibling / child / parent as class?’ is closed to new replies.