WordPress.org

Ready to get started?Download WordPress

Forums

SB Child List
Post-class not useful, assign sibling / child / parent as class? (2 posts)

  1. pinktank
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/sb-child-list/

  2. pinktank
    Member
    Posted 1 year ago #

    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>';
    				}
    			}
    		}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.