inner-wrap div pushing custom table far down on page

Part of the problem is that you’re running (or re-running) get_header() after your table, thus putting all of the header content into the body of page after the table HTML has started. <?php /* Template Name: Custom Table Is this part even needed for you? If this is a complete template, then probably, but if … Read more

How to sort wordpress posts by selecting a year from a drop down?

I answered my own question. I’m just a beginner, so the code is trash; I know, don’t judge. What you have to do is create a new query. First, go to your themes category.php file. People need to select the year from your ul/li menu. For me it is: <ul class=”dropdown-menu”> <li class=”nav-item”><a href=”?orderbyyear=2021″ class=”nav-link … Read more

Too few arguments at registering new templates in my plugin

This is the problem, or rather what is missing from it: add_filter( ‘theme_page_templates’, __NAMESPACE__ . ‘\register_plugin_templates’ ); Specifically, you never told it that your function can accept 3 parameters, so it assumed it only accepts 1 as that’s the absolute minimum needed for a filter to work. Then on top of that, none of your … Read more

understanding wp_next_scheduled

You’re probably attempting to add this too early. Wait for init. add_action( ‘init’, function () { if ( ! wp_next_scheduled( ‘send_booking_expiration_hook’ ) ) { wp_schedule_event( strtotime( ’12pm’ ), ‘hourly’, ‘send_booking_expiration_hook’ ); } } );