How do I change TinyMCE button “i” to create a i tag rather than em? [duplicate]

Here’s a simple function that will replace <em> with <i> on your post/page: function replace_em_with_i($content) { $content = str_replace(‘<em>’, ‘<i>’, $content); $content = str_replace(‘</em>’, ‘</i>’, $content); return $content; } add_filter(‘the_content’, ‘replace_em_with_i’); Warning: I have tested the code to check if it works (and it does work), but you might want to do some serious testing … Read more

Visual Composer Data Source?

I found this in the raw category template in the woocommerce files. <?php /** * The template for displaying product category thumbnails within loops * * This template can be overridden by copying it to yourtheme/woocommerce/content-product_cat.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will … Read more

Is there a visual editor specifically for page snippets/sections?

I found that this can be done simply by using WordPress’ Page editor. Nothing else is needed: Compose the content in WordPress’ Page editor Save (but don’t publish) In your code, retrieve the saved content By ID: $id=47; $post = get_post($id); $content = apply_filters(‘the_content’, $post->post_content); echo $content; Or by page title: $title=”page title”; $page = … Read more

Cafe Food Menu upload

Rock the custom fields? You could do this manually or by using a plugin such as magic fields or PODS. I’ve never used PODS but I’ve been eying it for a while and think this may be your best route. You could do something like creating a category called “breakfast” and one called “lunch” then … Read more

How do I use Mac Keyboard Icons in WordPress

The answer is rather simple – you type them. 🙂 When properly configured WP should be able to support Unicode characters for ⌘ and ⌥. Even when not you can fall back to numeric character references (&#8984; and &#8997; respectively). Windows key has no Unicode symbol and is typically abbreviated as Win. <kbd> HTML element … Read more