Fix error Gravatar alt

add_filter( 'get_avatar' , 'alt_name_avatar'); function alt_name_avatar( $avatar ) { $alt = get_comment_author(); $avatar = str_replace('alt=''','alt='Avatar for '.$alt.'' title='Avatar for '.$alt.''',$avatar); return $avatar; } This code works but throws an error. PHP Notice: Trying to get property 'user_id' of non-object in …/wp-includes/comment-template.php on line 28 PHP Notice: Trying to get property 'comment_ID' of non-object in …/wp-includes/comment-template.php … Read more

Validate rest-api call on create

WordPress Site A has an API, which is being used by another system/application (B). B is struggling to handle/controle/sanitize the posts being sent to the API, and often cause creation of duplicates. B is really struggling to solve this in their end, so I was wondering if I can add a validation-method to the endpoint in my end.

Implementing a modal(lightbox) for all images in all post-gallery posts

I’m trying to make a photo gallery page for all my photos in my post-gallery post and have a modal open when you click on the photos. In the page there will probably be almost 100 photos and i’m not sure how to do this in a good way without duplicating the code for the modal 100x. I have considered using plugins but i’d doing this as part of making my own website and learning developing wordpress themes so i’d prefer if the solution is done with code.