How create a Shortcode with hover and complex options

Gradient and boxshadow are fine to put inline. Your trouble will be with the hover states. Luckily there is a trick. You can put the hover styles in an outer element and force inherit on hover. Like this: <div class=”myshortcode”> <a style=”color:blue;”><span style=”color:red;”>Content</span></a> </div> In your style.css you add this generic line with a transition … Read more

Different post styles depending on category

If your theme has body_class() in the body tag (normally in header.php) then the category name is added to the body tag as a class e.g. <body class=”my-category”> So in a css file you can do .my-category #my-element { background:#FF0000; } To edit the html for the categories to make them card layouts then you … Read more

Custom query, checking values of multiple meta keys

You can use meta_query to combine multiple queries using either AND or OR relation. Granted, it does get a bit complex in this case, but because you can nest multiple queries, you can still achieve it. This is covered in the WP_Meta_Query documentation and also to an extent in the WP_Query docs. Here’s what I … Read more

WordPress admin is incredibly slow [closed]

A dev version clearly needs to be created. Resolving this will take time. You will need debug and the ability to experiment with disabling plugins. Chances are, the slowness is caused from a bad query with a plugin. Or too many scripts. Also, 100mb of memory is far inadequate for a site with that much … Read more

Display a message if posts dosen’t exist on loop

OK – so, first, you don’t need to serialize/unserialize. get_user_meta() will return an array, and delete_user_meta() can remove a specific value. So, simplifying a few other things here and below, your remove function would work like this (very simple): function teo_bookmark_remove() { $postID = $_POST[‘post_id’]; $current_user = get_current_user_id(); delete_user_meta( $current_user, ‘bookmarks’, $postID ); } Likewise … Read more