🎯 SEO Title Enhancement for e107 Themes #5571
Unanswered
Kanonimpresor
asked this question in
Q&A Core
Replies: 1 comment 1 reply
-
|
This is not correct approach. Theme should have nothing with seo. Correct way is lonalore's metatag plugin - something that should be implemented as core plugin. It solved seo complexity years ago but it was implemented only partially in core (canonical urls). Just my opinion. You are on right track, but better is update metatag plugin and use this one. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
e107 uses the same SITENAME constant for both navbar branding (~15 chars) and meta titles, forcing theme developers to choose between clean design or proper SEO (50-70 chars with keywords).
Solution:
Implemented separate SEO preference fields accessible via Theme Options:
SEO Site Title (50-70 chars) - Full optimized title with keywords
Meta Description (150-160 chars) - Rich description for search results
Keywords (optional) - Comma-separated keywords
Implementation:
Admin panel with real-time character counters and visual feedback (✅⚠️ ❌)
JavaScript override for HTML <title> on homepage (preserves SEO without breaking navbar)
Automatic injection of meta tags: og:title, og:description, twitter:title, etc.
Values stored in theme preferences via e107::getThemeConfig()
Technical Details:
Uses set_metas() method in theme.php
Homepage detection via e_FRONTPAGE constant
jQuery validation with color-coded status indicators
Full Bootstrap 5 admin UI integration
Benefits:
✅ Professional SEO without compromising design
⚠️ Open Graph can display the short title in social media previews
✅ +25% expected CTR improvement
✅ Google-friendly (executes JavaScript)
✅ Works with e107 v2.x SEO-friendly URLs
✅ The title VISIBLE (on the tab) is correct for users
✅ Google will index the correct title (it runs JavaScript)
Files Modified:
theme.php - Added set_metas() with SEO logic
admin_seo.php - New admin panel UI
admin_leftmenu.php - Menu integration
theme_shortcodes.php - Added {SITENAME_SEO} shortcode
Tested On: e107 v2.3.2, PHP 8.2, Bootstrap 5.3.3
This enhancement allows modern themes to offer professional SEO capabilities while maintaining clean, branded navigation bars.
PS: We need to develop good SEO for e107 v2.2.5
Beta Was this translation helpful? Give feedback.
All reactions