ACF background-color per post in a WordPress loop

Well, your problem lies in your CSS code. .card-container .main-content:hover { background: <?php the_field(‘background-farbe’ ); ?>; background-blend-mode: multiply; } It uses class only, so it will be applied to every element with that class. Multiplying the same code with different colors won’t change anything – only one such rule will be active. So how to … Read more

Search only for posts with specific metadata?

Quick question…which case applies? If you just need a query for today’s date being between two pieces of metadata, I’d create a widget running a fairly straight forward WP_Query and outputting the posts. If you are asking for the user to input a date to search, I’d probably still use a widget but would use … Read more

Changable favicon

If you have a modern theme, where you can upload a favicon with the theme customizer (rather than a hardcoded url in the header.php), you can simply use a filter. Take a look at the function get_site_icon. As you can see it returns the url of the image that you have uploaded using the customizer. … Read more

This occurs when I open admin or front on localhost

What version of WordPress are you running? Can you perhaps include the code from line 252 of that file? If it’s a current installation of WordPress, then it’s this: /** * @since 1.2.0 */ if ( !defined(‘COOKIEPATH’) ) define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_option(‘home’) . “https://wordpress.stackexchange.com/” ) ); … And I can’t really see why that all … Read more

Help with find a bit of code to move from functions.php

Everything before this is malware: <?php /** * Listify child theme. */ Delete everything before that, including the ?> in front of it. Keep in mind that if someone got access to add this code, then they could’ve done a lot more. Follow all the steps in the codex: https://codex.wordpress.org/FAQ_My_site_was_hacked