Join

Open an Elementor Popup From the MyListing Header CTA Button

Don't want to mess with code snippets? This is a feature of MyListing Pro.

Instructions

  1. Create a new JS code snippet.
  2. Copy the contents of code snippet below.
  3. Paste the contents into your code snippet.
  4. Review any notes that I’ve provided.
  5. Save and enable the code snippet.
  6. Test.

Snippet

By default, MyListing allows you to choose a page (Theme Tools > Theme Options > Header > Show Call to Action Button > Call to Action Links to Page) that the CTA button links to.

This code snippet allows you to link to an Elementor Popup.

  1. Create/Edit an Elementor Popup
  2. Popup Settings > Advanced Tab > Open By Selector > Enter a[href=”#addlisting”]
  3. Display Conditions > Conditions > Include > Entire Site
  4. Save changes.
  5. Add the code snippet below to your website.
JavaScript
jQuery('.header-right .header-button a.buttons').attr({
 'href':'#addlisting',
});
Youtube video