Timthumb isn’t displaying any images. "A TimThumb error has occured

I have a WordPress web site which is hosted on a distributed infrastructure. I have a web server(apache) and a cache server (varnish). When I load the site directly from web server everything is OK, but when I load the site from the cache, I sometimes get the following error: Timthumb isn’t displaying any images. « A TimThumb error has occured I saw some answers about this problem which mainly point out to the file permissions. But I don’t get any error related to permissions!! any help is appreciated. Source:…

Filter custom post types by a field value

I have custom post type of an animal type. (I.E I created an animals collection). I want to give the user a drop down to select the gender and filter the displayed custom post types entries accordingly. Right now the gender is a custom field but I can change that if there is a better approach. I already managed to display my collection by creating an archive-animal.php. How can I do that? I know to code but new to WordPress. Source: https://wordpress.stackexchange.com/feeds

How to pass parameters (data) from plugin PHP to React

I am experimenting creating a WordPress plugin using create-react-app. To make things simple, I am trying to develop a click-to-tweet plugin. The shortcode part (in PHP ) looks like: // Shortcode to output needed markup add_shortcode( ‘react_click_to_tweet’, ‘react_click_to_tweet_test’ ); function react_click_to_tweet_test($atts = [], $content = null, $tag =  ») { return ‘<div id= »root » data=’ . $content . ‘></div>’; } function include_react_files() { wp_enqueue_style( ‘prefix-style’, plugins_url(‘css/main.ae114d0c.css’, __FILE__) ); // add the JS file to the footer – true as the last parameter wp_enqueue_script( ‘plugin-scripts’, plugins_url(‘js/main.d8745ba2.js’, __FILE__),array(), ‘0.0.1’, true ); } add_action(…

Web Design Weekly #284

Headlines Casting Graphite in Gold Daniel Eden shares some broad themes that he has found lead to happier, more productive relationships between Designers and Engineers that are often overlooked when working together. (daneden.me) [Creating truly universal React component systems (medium.com)]2 Sponsor Web Design Weekly and reach over 24,800 passionate designers and developers Articles A Working Pattern Library Ethan Marcotte shares a few tips on how organisations can continue to build upon and utilise all the ground work that went into creating a pattern library, as opposed to leaving it to…

mySQL database size large, but tables size less

I have my site hosted with NetworkSolution, and they have a sql database size limit of 300MB. IF the size exceeds this limit we cannot access the wordpress admin dashboard. So currently its showing 441MB, and its overlimit. And they are force me to upgrade the database size to 1GB for 120$/yearly. But previously I had all tables size totaling to 45MB, but the database size was 321MB, and I had to request them to grant me access, so they use to resync/optimise the database, so it gets the actual…

How can I remove certain HTML tags from the RSS feed?

One news aggregator wants to have RSS feed without any links into the <description> field. So I try to use this code in functions.php to remove <a href></a> tags, but it doesn’t work. What’s wrong? How can I remove the tags but keep intact all the text? add_filter(‘the_content’, ‘my_custom_feed’); function my_custom_feed( $content ){ global $post; if ( ! is_feed() ) return $content; // Remove all shortcodes $content = strip_shortcodes( $post->post_content ); $content = strip_tags( $content ); // Remove all html tags, except these $my_allowed_tags = array( ‘p’ => array(), ‘strong’…

Adding external stylesheet after ALL other styles

The theme I’m using makes extensive use of internal stylesheets to style various types of pages and their elements. For example, through their plugin UI, I can configure a specific page’s hero layout and content… including font, size and color for various text elements. After configuring the hero and publishing the page, an internal stylesheet is added to the page’s <head> tag: <style id= »ut-hero-custom-css » type= »text/css »> #ut-hero .hero-inner { text-align: right } .hero-description { color: #000000; } .hero-description { background: #FCB54B; padding-bottom: 0; margin-bottom: 5px; } #ut-hero .hero-title { color: #1777FF;…

How to get Custom Taxonomy ID from the post ID

In my setup, I have two custom taxonomy called Regions & Sections. All the post in site can either be from region taxonomy or from section taxonomy. At certain point outside the loop I have the post details and I need the taxonomy ID. I don’t have the taxonomy name at that point to use get_the_terms function. Any help will be very appreciated. Source: https://wordpress.stackexchange.com/feeds