custom changes removed after plugin update

If it’s just a CSS change, load your own CSS stylesheet to override their CSS. If it’s the HTML of the plugin, then you will need to look at filter hooks to see what you can change. Some plugins are developer friendly and supply some filter hooks allowing you to change various things the plugin … Read more

How to add image attachment to post from a single meta key (Woocommerce)

I got it now using the following code: //featured image from postmeta function postmeta_img_update() { global $post; // If Custom Post Meta Field for a Image/Thumnail Exists if( get_post_meta($post->ID, “_image”, true): // Get Image Location and File Extention $img = get_post_meta($post->ID, “_image”, true); $ext = substr(strrchr($img,’.’),1); // WordPress Upload Directory to Copy to (must be … Read more

Translating long texts with html formatting

Most translation tools are really hard to use when you try to handle a long text, so the translators have to use a HTML editor anyway. Use separate files, but use the language prefix as directory name: en main.html help-main-options.html help-special-options.html de main.html help-main-options.html help-special-options.html That’s easier to handle for translators and for you too. … Read more

get_post_type() and WP_QUERY issue

If you look at the source and the Codex page for get_post_type you will see that returns the type of the “current post” unless you pass it a post ID or post Object. get_post_type should work without a parameter if you are running that code on the post edit page(s) generated by WordPress for post … Read more

Creating plugin using simple_html_dom parser?

Maybe I’m missing something, but in your first print_r($articles), the global variable $articles is in the scope of the getArticles() function, so we’re all good there. But, in your second print_r($articles), which is happening after the closing brace of the getArticles() function declaration, $articles has not been globalized. So, it’s just set to the empty … Read more

Woocommerce disable shopping cart based on user roles

The Catalog Visibility Options plugin sounds like it would do what you want. It can disable the shopping features for “guests” and allow them for registered/logged in users. Then if you want to add a Quote form you could use Gravity Forms + WooCommerce Gravity Forms Add-ons. You might be able to use the “conditional … Read more

Redirection based on location but without affecting search bots

Search Help Google to determine the site language and to serve the right page for the users in different countries. Mark up language attributes correctly. Use <html lang=”en_UK”> and <html lang=”en_US”>. Use <link rel=”alternate” hreflang=”x” /> in page <head>. It’s also important to specify site targeting in Google Webmaster Tools. Referrers I believe people residing … Read more