How to use emojis in your page title and meta description
Yoast SEO on WordPress doesn’t render emojis in its preview because it’s designed to show a plain text approximation of how search engines will display the snippet. However, if you want the emojis to appear on actual search results or in the post content, they should still work.
Here’s how to ensure they’re visible:
- Paste Emojis Directly: Make sure you’re pasting the emojis directly into the meta title and meta description fields in Yoast. Copy the emojis from an emoji website like Emojipedia if needed.
- Check the Page or Post Content: Publish or preview your post and view the page source (right-click > “View page source”) to confirm that the emojis are present in the meta description.
- Clear Caches: If you’re using a caching plugin, clear the cache after updating the emojis to make sure the changes reflect on the live page.
- Test on Google: It may take time for Google to crawl and update the new metadata with emojis, and Google may choose to display them differently based on its own styling rules.
While Yoast may not display emojis in the editor preview, following these steps should ensure they are part of your published metadata.
If the emojis are disappearing after updating the page, this could be due to:
- Theme or Plugin Conflicts: Some WordPress themes or plugins may filter out special characters like emojis from meta descriptions. Try disabling plugins one by one, especially those related to SEO or performance optimization, and check if the emojis remain.
- Yoast Stripping Emojis: Sometimes, Yoast itself may strip out non-standard characters when saving meta descriptions. Ensure that Yoast is fully updated, as sometimes updates fix issues related to character encoding.
- Database Encoding Issues: Emojis require the database to support UTF-8mb4 encoding. If your database doesn’t support this, emojis can get removed upon saving. You can contact your hosting provider to help check or update the database encoding.
- Alternative SEO Plugins: If Yoast continues to remove emojis, you could try an alternative SEO plugin, such as Rank Math or All in One SEO, which may support emojis better in meta descriptions.
If none of these work, one final approach is to place the emojis in the first line of the post content itself, so they appear in the search engine snippet if Yoast doesn’t allow them in metadata.
To enable emoji support, your WordPress database needs to use the utf8mb4 character set, which supports a wider range of characters than the standard utf8. Here’s how to check and update your database to utf8mb4:
Step 1: Backup Your Database
Before making any changes, it’s essential to back up your database to avoid potential data loss. You can use plugins like UpdraftPlus or All-in-One WP Migration to back up your database.
Step 2: Access phpMyAdmin
Most hosting providers offer phpMyAdmin in the hosting control panel. Log in to your hosting account and go to phpMyAdmin.
Step 3: Check Database Collation
- In phpMyAdmin, select your WordPress database from the left sidebar.
- Check if the collation for your database and tables is set to
utf8mb4_unicode_ci
orutf8mb4_general_ci
. If not, you’ll need to change it.
Step 4: Change Database and Table Collation to utf8mb4
To change the collation, follow these steps:
- Change Database Collation:
- In phpMyAdmin, select the database (not any specific table) from the sidebar.
- Go to the Operations tab.
- In the Collation dropdown, choose
utf8mb4_unicode_ci
orutf8mb4_general_ci
. - Click Go to save.
- Change Table Collation:
- Inside the database, you’ll see a list of tables.
- For each table, click on Operations.
- Set the collation to
utf8mb4_unicode_ci
orutf8mb4_general_ci
and save.
- Change Columns Collation (optional but recommended):
- Click on each table name.
- Go to the Structure tab.
- For each column that stores text (like
CHAR
,VARCHAR
, orTEXT
), set the collation toutf8mb4_unicode_ci
.
Step 5: Update the WordPress Config File
To make sure WordPress recognizes the new encoding, update your wp-config.php
file:
- Go to your WordPress root directory, where
wp-config.php
is located. - Open
wp-config.php
in a text editor. - Look for the following lines:
- Change
DB_CHARSET
toutf8mb4
: - Save the file and upload it back to your server if you’re editing locally.
Step 6: Test the Changes
After making these changes, try adding emojis again to your WordPress post or meta description in Yoast. This should now support emojis without issues.
If you’re uncomfortable making these changes, your hosting provider’s support team should be able to assist with updating the database encoding to utf8mb4.
Need Help? Contact us:
+91 98826 06526
Web.Expert1380
+91 98826 06526
FaceBook
support@modulesgarden.in