Viewing 4 replies - 1 through 4 (of 4 total)
  • did you resolved it?
    Can you explain any workaround?
    Thanks

    Thread Starter drags

    (@drags)

    Yes, I’ve resolved it. That is the code, that you need to change ??

    wp-dtree plugin directory has three files for pages, archives and categories. Filenames respectivly: wp-dtree_pge-functions.php, wp-dtree_arc-functions.php and wp-dtree_cat-functions.php.

    If you are using only one wp-dtree tree(for example for displaying pages), so you need to edit only pages(wp-dtree_pge-functions.php) file ??

    Find the text in those files:

    For categories(wp-dtree_cat-functions.php), in line 101:
    echo $catresults;
    and replace with
    echo apply_filters( 'the_title', $catresults);

    For pages(wp-dtree_pge-functions.php, in line 37:
    echo $pgeresults;
    and replace with
    echo apply_filters( 'the_title', $pgeresults);

    For archives(wp-dtree_arc-functions.php), in line 123:
    echo $arcresults;
    and replace with
    echo apply_filters( 'the_title', $arcresults);

    Still, I hadn’t time to fix the Titles of the trees. I’ll post it later.

    Thread Starter drags

    (@drags)

    Here it goes the title filtering:

    Open file wp-dtree.php from wp-dtree plugin directory

    between lines 129 and 169 there are three lines (you will find them easily:

    echo $before_title . $wpdtreeopt['arcopt']['topnode'] . $after_title . "<ul>";
    (this one is for archives tree title filtering)

    echo $before_title . $wpdtreeopt['catopt']['topnode'] . $after_title . "<ul>";
    (this one is for categories tree title filtering)

    echo $before_title . $wpdtreeopt['pgeopt']['topnode'] . $after_title . "<ul>";
    (this one is for pages tree title filtering)

    In order to filter the title of trees which are created by wp-dtree plugin, you have to replace only these parts:

    $wpdtreeopt['catopt']['topnode']
    $wpdtreeopt['pgeopt']['topnode']
    $wpdtreeopt['arcopt']['topnode']

    with these:

    echo $before_title . apply_filters( 'the_title', $wpdtreeopt['catopt']['topnode'] ) . $after_title . "<ul>";
    echo $before_title . apply_filters( 'the_title', $wpdtreeopt['pgeopt']['topnode'] ) . $after_title . "<ul>";
    echo $before_title . apply_filters( 'the_title', $wpdtreeopt['arcopt']['topnode'] ) . $after_title . "<ul>";

    Of course, you can change only one line if you are using only one type of tree ??

    Hope it helped ??

    Thread Starter drags

    (@drags)

    sorry, the last segment of code is mis”pasted” ??
    here it goes the correct version:

    apply_filters( 'the_title', $wpdtreeopt['catopt']['topnode'] )
    apply_filters( 'the_title', $wpdtreeopt['pgeopt']['topnode'] )
    apply_filters( 'the_title', $wpdtreeopt['arcopt']['topnode'] )

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP-dTree with Language Switcher’ is closed to new replies.