WP overwrites my setup_postdata() setup

Should all CPT “lecture” posts use this template? If so, just rename your file single-lecture.php and place it in the root directory of your theme, and WP will automatically use it due to its template hierarchy. If instead you’re trying to assign this custom template to hand-picked pages, wherever you register your post type, add … Read more

How to use template_include hook with form submission?

It turns out that $wp->query_vars[“post_type”] contains the data I need, regardless of whether the request method is GET or POST. namespace mynamespace; class MyPlugin { public static function template_include($template) { global $wp; if ($wp->query_vars[“post_type”] == ‘thing’) { return plugin_dir_path( __FILE__ ) . ‘templates/thing.php’; } return $template; } } add_filter(‘template_include’, ‘\mynamespace\MyPlugin::template_include’); Also, it appears that the … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedueduedueduedusedueduedusedu