How to Remove the Unwanted Dot in the Header of the Clever Fox Theme

How to Remove the Unwanted Dot in the Header of the Clever Fox Theme

If you’re using the Clever Fox WordPress theme and noticing an unexpected dot at the end of text elements in the header area (like “Email Us.” or “Online 24×7.”), this is likely due to how the theme outputs text in the above-header.php file.

In that file, the theme uses PHP’s printf() function with a format string that includes a period, like this:

printf( esc_html__('%s.', 'clever-fox'), esc_html($tlh_contact_title));

This line takes the value of $tlh_contact_title and appends a dot to the end.

To remove the dot, you simply need to change the format string from '%s.' to '%s'. Here is an example:

Before:

<span class="text"><?php printf( esc_html__('%s.', 'clever-fox'), esc_html($tlh_contact_title)); ?></span>

After:

<span class="text"><?php printf( esc_html__('%s', 'clever-fox'), esc_html($tlh_contact_title)); ?></span>

Make the same change for other similar lines in the file, including those using:

  • $tlh_contact_sbtitle
  • $tlh_email_title
  • $tlh_email_sbtitle
  • $tlh_mobile_title
  • $tlh_mobile_sbtitle

If you are using a code editor like VS Code, Sublime Text, or Notepad++, you can use the search function to find all occurrences of %s. and replace them with %s. This will speed up the process and help avoid missing any lines.

Remember to create a backup of the file before making changes, or better yet, use a child theme to ensure your edits are update-safe.

After these adjustments, the unwanted dot will be gone and your header will display cleanly.

Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.