wordpress theming - get_template_part works on one server/host, but not another -


on own server, worked fine:

query_posts(array('post_type'=>'events', 'paged' => get_query_var('page'), 'posts_per_page' => 10, 'orderby' => 'meta_value', 'order' => 'asc', 'meta_key' =>'details_date')); get_template_part( 'event-loop', 'events' ); 

go launch, move on client's server, , won't work. breaks page actually, , sidebar , footer don't show up. no error whatsoever, blank space. "view source" confirms html ceases after "get_template_part" call. same happening "news" page, uses "get_template_part". moved these files on own server confirm worked there, , do. when remove "get_template_part", sidebar , footer appear.

is there kind of server configuration might prevent get_template_part functioning correctly?

when using get_template_part(), second parameter optional. need filename of template part file without .php extension. must ensure template part file in root of wordpress theme folder. in case i'm assuming filename 'event-loop.php'.

try:

get_template_part('event-loop'); 

or:

get_template_part('event', 'loop'); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -