How to add Elfsight widget to Joomla 4 website

To add Elfsight widget to your Joomla 4 website, you need the installation code. Here is an article that explains where to get it - Where to get Elfsight widget installation code.

This article is all about Joomla 4. If you need help installing widgets to an older version of Joomla, please read this article - How to add Elfsight widget to Joomla website.

In this article

  1. Specific page (home page, contact, etc.)
  2. All pages

Adding your widget to a specific page

1
Go to Joomla website editor and open Site Templates
Log in to your Joomla website's admin panel. Go to SystemTemplatesSite Templates and choose the template your website uses:

2
Paste the first line of your installation code
Open the index.php file, find the Body tag and paste the first line of your installation code at the end of the Body section:
<script src="https://apps.elfsight.com/p/platform.js" defer></script>
Then click Save to apply changes:
3
Choose the page for your widget
Go back to your Control Panel. Click Content in the left-hand menu, then Articles, and choose the page in the Articles section where you'd like to display your widget:
4
Paste the second line of your installation code
Click MoreSource Code, paste the second line of your installation code, click Ok and then Save:

You have successfully added the widget to a specific page of your Joomla website!

Adding your widget to all pages

1
Go to Joomla website editor and open Site Templates
Log in to your Joomla website's admin panel. Go to SystemTemplatesSite Templates and choose the template your website uses:

2
Paste your installation code
Open the index.php file, find the Body tag and paste your installation code at the end of the Body section. Click Save to apply changes:

Done! Your widget is now added to all pages of your Joomla website!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us