Support » Plugin: Display Widgets » Show page parents in checkbox label

  • Our site uses child (and grandchild) pages that have identical titles. The only way of distinguishing one child page from another when the titles match is by looking at their page parent.
    As a result, the page checkbox labels are difficult for us to use as is – there is no way of telling which child page we are selecting.
    To fix this, I modified display-widgets.php at line 140 and added this code:

    if($page->post_parent){
    	        $parent = get_page($page->post_parent);
            }
            if($parent->post_parent){
    	        $grandparent = get_page($parent->post_parent);
            }
            if($parent->post_parent){
    	        echo $grandparent->post_title. ' - ';
            }
            if($page->post_parent){
    	        echo $parent->post_title. ' - ';
            }

    This will be gone if we update the plugin. I wonder if there is a way to get this included in the next release?

    http://wordpress.org/extend/plugins/display-widgets/

  • The topic ‘Show page parents in checkbox label’ is closed to new replies.