You are not logged in. Login or Register to participate and more giveaway every night by admin

Warning: Any suspicious activity will result in an immediate ban and removal from our forum. Follow the rules and respect the community.

Reminder: New users cannot post links until they have at least 1000 posts. Please engage in discussions before sharing links.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Html code for theme colour
#1
To set a theme color in your WordPress theme using HTML and meta tags, you can use the following code:

Set Theme Color for Browser UI
Add this <meta> tag inside the <head> section of your WordPress theme (header.php):

PHP Code:
<meta name="theme-color" content="#ff6600"

Replace #ff6600 with your preferred color code.
This changes the browser's address bar and mobile UI elements to match your theme color in supported browsers (e.g., Chrome on Android).
Adding Theme Color in WordPress via functions.php
If you want to add it dynamically, insert this PHP code in functions.php:

Code:
function custom_theme_color() {
    echo '<meta name="theme-color" content="#ff6600">';
}
add_action('wp_head', 'custom_theme_color');
Reply
  


Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  Meta theme Browser colour Html Code Shedi 0 52 01-09-2025, 12:37 AM
Last Post: Shedi

Forum Jump:


Users browsing this thread:
1 Guest(s)