Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter luKkw

    (@lukkw)

    Thread Starter luKkw

    (@lukkw)

    I managed to find the real problem of its disappearance (although it doesn’t solves the problem) :

    It seems that there is a conflict between jquery libraries when I enable another jquery library from googleapis. The one used by the plugin (“jquery.tools.min”) is loaded but just doesn’t work.

    So when I remove the google jquery library one, the plugin works again perfectly.

    I tried few things found here and there, like this one , but without further knowledge of javascript, it seems I’m on a dead end

    Thread Starter luKkw

    (@lukkw)

    Yes, you were right again. I remove the useless is single() && and it worked perfectly. – I definitely should learn basics -_-
    Thank you for all your help !

    Thread Starter luKkw

    (@lukkw)

    I managed to improve the code a little bit for those who may need a more that 1 level of hierarchy (a folder which include multiple folders which hold children files)
    The previous one doesn’t seems to work beyond one level of parent-child relationship

    This one does the trick for me

    <?php
    global $post;
    $children = get_pages( array( 'child_of' => $post->ID, 'post_type' => 'MYCUSTOMPOSTTYPE' ) );
    if ( is_single() && count( $children ) > 0 ) : ?>
    <?php include STYLESHEETPATH . '/PARENT-TEMPLATE.php';//Load template for parent ?>
    <?php else : ?>
    <?php include STYLESHEETPATH . '/CHILD-TEMPLATE.php'; //Load template for child ?>
    <?php endif; ?>

    Thread Starter luKkw

    (@lukkw)

    This is brilliant! – yet so simple
    I’m a newbie on coding (and wordpress) and even though I can understand a little bit the language, I’ve never mastered basics. Now I know what I’m missing.

    I managed to find a solution by installing a plugin that allowed me to choose different templates on CPT and change them manually everytime, but this is so much better ! (The plugin is called “WP Post Template” for those who may need it)

    Thanks you very much !

    Thread Starter luKkw

    (@lukkw)

    I’m pretty sure it is possible but you’ll have to change either the plugin code (which is highly above my skills) or use (and sacrifice) another wp-dtree-XXX.php (like the category one).
    In this last solution, I suggest trying to copypaste the whole code of wp-dtree-pge.php to the one you’re willing to sacrifice. Unfortunately I do not remember if it is necessary to change something somewhere else.

    Thread Starter luKkw

    (@lukkw)

    So I found one imperfect solution, but it worked and suited enough my needs :
    within wp-dtree-pge.php, below
    – $pageresults = get_pages(array(
    I just added
    – ‘post_type’ = > ‘MYCUSTOMPOSTTYPE’,
    without changing anything else.

    The WP-dTree Pages widget now would just search for MYCUSTOMPOSTTYPE custom post types to fill the list.
    I could not make all options work, but these ones perfectly do:
    – folders are links
    – highlight selection
    – open to selection
    – sort by “Menu Order”

    It’s imperfect so if there still is a better way to proceed, I’ll take it ! 😀

Viewing 7 replies - 1 through 7 (of 7 total)