Insert ads below the title

You can use mh_post_header action hook to add your ads content after the post title. Check the following code snippet for help add_action( ‘mh_post_header’, function() { echo ‘Ads content goes here’; }, 5 );

Filter content in shortcode

The year attribute you added to shortcode [speaker_overview_2017 year=2017] will be available through $atts in this way $atts[‘year’]. I assume, you want to do a meta query and the key is speakers_jaar and the value will be $atts[‘year’]. Please check the following code. When a year is set in shortcode, query will be limited to … Read more

Change the number of plugins counted on wp-admin/plugins.php

The values haven’t any hook to change this. However it is easy to identify the counter via Javascript. You can change this with short lines of Javascript. Hook You should hook in this page hook of the plugin page admin_footer-plugins.php, like add_action( ‘admin_footer-plugins.php’, [ $this, ‘change_view_values’ ], 11 ); Function include javascript As example a … Read more

How to include files relative to a file’s directory

Plugin within a theme – sounds like something new. You might not find function in this context. Let’s create ours: <?php /** * Get My Plugin URL. * @return string. */ function wpse295740_get_plugin_url() { // http://example.com/wp-content/themes/my-theme/inc/my-plugin return get_template_directory_uri() .’/inc/my-plugin’; } /** * Get My Plugin Path. * @return string. */ function wpse295740_get_plugin_path() { // eg. … Read more