在Wordpress中使用get_tmplate_part()函数
我正在制作一个wordpress主题,其中我有不同的皮肤和模板,使用get_template_part()函数来加载不同的块/模板而不是一个文件是不是一个好主意。我发现它很有用,但我唯一关心的是,这个函数是否会在服务器上加载或以任何方式影响性能?我使用它的方式如下:在Wordpress中使用get_tmplate_part()函数,wordpress,Wordpress,我正在制作一个wordpress主题,其中我有不同的皮肤和模板,使用get_template_part()函数来加载不同的块/模板而不是一个文件是不是一个好主意。我发现它很有用,但我唯一关心的是,这个函数是否会在服务器上加载或以任何方式影响性能?我使用它的方式如下: /* Post Tags Template */ get_template_part( 'templates/post_tags' ); /* Post Meta Template */ get_template_
/* Post Tags Template */
get_template_part( 'templates/post_tags' );
/* Post Meta Template */
get_template_part( 'templates/post_meta' );
使用
get\u template\u part
可能不会影响性能。查看关系问题或更新的文章。