// Chargement d'un nouveau template de portfolio


add_filter( 'template_include', 'wpm_portfolio_template' );


function wpm_portfolio_template( $template ) {

    if ( is_page( 'portfolio' ) ) {

        $new_template = locate_template( array( 'template-portfolio.php' ) );

        if ( '' != $new_template ){

            return $new_template ;

        }

    }

return $template;

}

// Chargement du template pour articles étiquetés avec "infographic"


add_filter( 'single_template', 'wpm_single_infographic_template' );


function wpm_single_infographic_template( $single_template ) {

    global $post;

    if ( has_tag( 'infographic' , $post ) ) {

        $new_template = locate_template( array( 'template-infographic.php' ) );

        if ( '' != $new_template ) {

            return $new_template ;

        }

    }

    return $single_template;

}

Create a presentation like this one
Share it on social medias
Share it on your own
Share it on social medias
Share it on your own

How to export your presentation

Please use Google Chrome to obtain the best export results.


How to export your presentation

WCParis Template Hierarchy

by alexc4e

1098 views

Unlisted - 1/16/16, 7:05 AM