I want to add the alt attribute to all the photos!

If your current code manages all blocks with images replacing usage wp_get_attachment_image_src with output of hardcoded img tag, with echo wp_get_attachment_image() which will return img tag as string with default alt of image or empty if non set will work. Below is your code updated with idea described. <?php class home_main_post_below_list extends AQ_Block { //set … Read more

500 error after upgrading from 5.0 to 5.4 and adding empty functions.php

I’ve managed to print the error message by adding the following to the functions.php: function exception_handler($exception) { echo “Uncaught exception: ” , $exception->getMessage(), “\n”; } set_exception_handler(‘exception_handler’); For some reason logs did not include the error details before. The error is call to undefined function is_blog_installed() which I have no idea why’s that. 😀

Get term count on a category page

Rather than adding shortcode you have to add the hook which is on the product category page: // Use this hook for working directly on category page // add_action( ‘woocommerce_archive_description’, ‘show_category_product_counts’, 10 ); // Use this shortcode hook if you want to put on anywhere in the category page if you are using Elementor/WPBakery add_shortcode( … Read more

Filter to strip unnecessary attributes

To make it more clear: (From the comments on the question) Q: The “output” or “HTML” of which function exactly? A: Any. I’d like these attributes removed from my whole theme. WP & Functions: WordPress has around 2.5k functions with the current version 3.4.2. Now imagine, that we would (or even could) check each function … Read more

How can I add authors to my blog pages?

Add some more authors in wp-admin, and if You would like to show author under a post, place: <?php the_author(); ?> in index.php, single.php or any other template file, that Your theme is using to show blog posts, single post, archive etc.