How to direct WordPress to load custom template for custom post type

For future audience sake, this notice is added. The following answer assumed anyone have the following knowledge php and basic debug knowledge: how to var_dump() or print_r() WordPress Core Filter and Action known as Hooks, when and how to use them correctly feel comfortable modifying theme file functions.php for plugin-related development, please refer to Plugin … Read more

Show username only if logged in in a else no directly name

this is the whole code in stoerer.php <!doctype html> <html lang=”de”> <meta charset=”utf-8″> <title> Störer</title> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js”></script> <link rel=”stylesheet” href=”style.css” type=”text/css”> </head> <body> <header> <button>Ich bin ein Störer</button> <!– Und dann die Info-Box –> <div id=”infoBox”> <button class=”cross” type=”button”>X</button> <p> Hello </p> <?php wp_get_current_user(); ?> <p> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, … Read more

Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin

For anyone that may be interested, I was able to solve this using the following code in mp_custom_page_title: // JetPack remove_action(‘wp_head’,’jetpack_og_tags’); // Yoast SEO if (defined(‘WPSEO_VERSION’)) { global $wpseo_front; if (defined($wpseo_front)) { remove_action(‘wp_head’,array($wpseo_front,’head’),1); } else { $wp_thing = WPSEO_Frontend::get_instance(); remove_action(‘wp_head’,array($wp_thing,’head’),1); } add_filter(‘wpseo_opengraph_url’,’__return_false’); add_filter(‘wpseo_opengraph_desc’,’__return_false’); add_filter(‘wpseo_opengraph_title’,’__return_false’); add_filter(‘wpseo_opengraph_type’,’__return_false’); add_filter(‘wpseo_opengraph_site_name’,’__return_false’); add_filter(‘wpseo_opengraph_image’,’__return_false’); add_filter(‘wpseo_opengraph_author_facebook’,’__return_false’); add_filter(‘Yoast\WP\Woocommerce\product_condition’,’__return_false’); } // All-In-One SEO if (defined(‘AIOSEOP_VERSION’)) … Read more