How to change a wordress plugin php code in my child’s functions.php file?
How to change a wordress plugin php code in my child’s functions.php file?
How to change a wordress plugin php code in my child’s functions.php file?
Mysterious letters appearing at the top of a few pages
This seems to be the way: add_filter( ‘option_active_plugins’, ‘disable_plugins’ ); function disable_plugins($plugins){ return []; // you can define specific plugins you want to load here. }
WooCommerce seems to update the ‘last modified’ value of a product on every change. If you want to take a look at the source code, go to woocommerce\includes\data-stores\class-wc-product-data-store-cpt.php and check the function update. This solution seems to work, however it could be improved to make sure it doesn’t mess up with anything else. Basically checks … Read more
You can use a combination of caching plugin and appropriately coded themes and plugins to cache query results and speed things up. Yes, eventually if you are running many queries, a site can get bogged down. This typically happens when query-intensive themes or plugins are used. To start investigating your own site’s queries, there are … Read more
You’re talking about scraping, which is generally an unreliable method of getting data, especially if you don’t control the other page. However, in PHP, once you retrieve the download page with something like wp_remote_get, you can use a regular expression to extract the pieces you need with preg_match_all. $response = wp_remote_get( ‘domain.com/download-page/’ ); $page = … Read more
No need to use []… just use simple single quotations (also no quotations does the job): $sql =” SELECT … WHERE wp_users.`ID` = ‘$userID'”; OR $sql =” SELECT … WHERE wp_users.`ID` = $userID”;
As per WP documentation, Using the WP_Meta_Query::parse_query_vars( $query ) method: You can use this method, if you want to use the simple query args(meta_key, meta_value, meta_type, meta_compare), or if you are unsure of the presence of meta query parameters. Hence, I tried converting meta_key, meta_value and meta_compare in source code to wrap inside meta_query as … Read more
So it depends, one 2 things: hardcoded HTML tags containing spanish text i18n api text, e.g. echo __( ‘string’, ‘textdomain’ ); You want the latter, but the theme author may not have used that API Hardcoded HTML tags This is when the text is hardcoded in the file, e.g. <p>spanish text</p> <?php echo “spanish text”; … Read more
You can control this with media queries in CSS. @media screen and (max-width: 768px) { div.row { width: 50%; } } /* for iPad */ @media screen and (max-width: 600px) { div.row { width: 100% } } /* for mobile phones */ I hope this helps. UPDATE: You can’t do this with PHP because PHP … Read more