Unable to reach the person who wrote that cronjob for us too, so I’ve just turned everything off and want to clean up the scheduled actions without needing to use SSH or SQL.
]]>Wow, more than 800,000 jobs! There are few plugins that can do this such as:
Give it a try.
My advice: Audit your site as having 800,000 corn jobs is way beyond normal.
Cheers!
]]>I’m creating a classic WordPress theme. I’d like to create a configuration class with a plugin_setup
method that handles various configurations, such as importing CSS and JavaScript, creating custom post types and taxonomies, and other tasks.
I’ve created a simple setup that currently does nothing, but when I load a basic empty homepage.php
page, the plugin_setup
method is called twice. Is it possible to prevent the plugin_setup
method from being called twice?
This is the code I’m using:
Code of functions.php:
if ( ! class_exists( 'DIS_ThemeManager' ) ) {
require_once get_template_directory() . '/classes/theme-manager.php';
}
if ( class_exists( 'DIS_ThemeManager' ) ) {
error_log("Running after_setup_theme");
add_action(
'after_setup_theme',
function() {
$theme_manager = DIS_ThemeManager::get_instance();
$theme_manager->plugin_setup();
}
);
}
Code of theme-manager.php :
class DIS_ThemeManager {
protected static $instance = null;
private function __construct() {}
public static function get_instance() {
if ( is_null( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
public function plugin_setup() {
}
}
Code of homepage.php:
<?php
// get_header();
?>
<main id="main-container" class="main-container redbrown" role="main">
HELLO
</main>
With this setup, the add_action
method and plugin_setup
are called twice.
If I uncomment get_header()
in homepage.php
, they are called three times.
Why does this happen? Is it possible to prevent this behavior?
Thank you
Claudio
]]>The linked site’s homepage uses a Classic theme. The top section of the homepage features recent posts in particular post categories. Even when the same category is assigned to multiple “slots’ in this top section, the same post will not appear more than once. Additionally, none of the post featured in the top section will appear in the bottom section.
I was able to achieve this in the site’s Classic theme by maintaining a running list of all the posts previously displayed in the top section, and modifying the multiple query loops in the page’s PHP template to feed this list as an array into each query, as an exclusion.
Can the same thing be achieved in an FSE theme using the an extended version of the Query block, and if so, what would be the steps required to achieve this?
I’m not necessarily looking for details and example code at this stage, just need to know if it’s possible to achieve this at all, and where I might start, if so.
I’m looking to create a new FSE theme for the site, and I think I can make it do everything I need using just stock WP blocks, apart from this one key feature of the old theme.
Any tips greatly appreciated!
]]>2. Upload via WordPress Customizer
3. Manually Add Favicon in the <head>
If the automatic upload doesn’t work, try adding this code to your header.php file inside <head>
:
<link rel="icon" type="image/png" href="https://yourwebsite.com/favicon.png">
Make sure to replace the URL with the actual favicon file location. 4. Check Google’s Favicon Guidelines
<link>
tag.Having the right favicon enhances branding, just like how Irish sea moss gel enhances health with its natural minerals! Hope this helps—let me know if you need further clarification. 😊
]]>