docker + wordpress + nginx = intermittent 404
So Im posting the answer if that helps anyone. It turns out all my issues where coming from a failed wordpress auto update to 6.5.4. after forcing the update everything came back to normal
So Im posting the answer if that helps anyone. It turns out all my issues where coming from a failed wordpress auto update to 6.5.4. after forcing the update everything came back to normal
Why is my Gutenberg block not saving and rendering the chessboard?
You can do the inspect element in the chrome and see if there is any unique class added for that image something like image-123, if yes you can use that. If you can provide me the link to the page were image is used and image, I can provide you what exact css class you … Read more
You can access the current query on a custom post type archive page with global $wp_query;. By using the global variable which holds the current query, you don’t need to do an additional query. To keep your header.php file cleaner, you could use actions and callback functions placed in your functions.php file to put the … Read more
Struggling with Per-Item Shipping and Classes
To adjust the WooCommerce code so it adds an extra specific amount based on the shipping zone, you can modify the existing function to include shipping zone-based costs. Here’s a streamlined version of the code: add_filter( ‘woocommerce_package_rates’, ‘add_cost_based_on_zone_and_quantity’, 10, 2 ); function add_cost_based_on_zone_and_quantity( $rates, $package ) { $shipping_class = “very-light-weight”; // Define the shipping class … Read more
To run non-WordPress PHP files in a subfolder alongside a WordPress installation, follow these steps to modify your .htaccess file: Choose a Subfolder Name: Decide the name for your subfolder, e.g., mycustomphp. Modify the .htaccess File: Add the following lines above the # BEGIN WordPress section to exclude your subfolder from WordPress’s URL rewriting: RewriteEngine … Read more
To create a custom field archive in WordPress where posts are filtered by a user_submit_name custom field, follow these steps: Register a Query Variable: This enables WordPress to recognize and use this variable in the URL. function register_query_vars( $vars ) { $vars[] = ‘user_submit_name’; return $vars; } add_filter( ‘query_vars’, ‘register_query_vars’ ); Modify the Archive Query: … Read more
Try this. Here is the full code that you can add to your functions.php file: // Add custom rewrite rules function add_custom_rewrite_rules() { add_rewrite_rule( ‘^category/([0-9]+)/?$’, ‘index.php?term_id=$matches[1]’, ‘top’ ); flush_rewrite_rules(false); // Temporarily set this to true to flush rules, then set back to false } add_action(‘init’, ‘add_custom_rewrite_rules’); // Add term_id to query vars function add_query_vars($vars) { … Read more
is it possible to get a list of URLs from post_content directly in a mysql query via phpadmin?