Sponsored Content
The Wayback Machine - https://web.archive.org/web/20220601140646/https://github.com/elementor/elementor/issues/8097
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic content to Social Icons #8097

Closed
2 tasks done
wpsumo opened this issue May 12, 2019 · 7 comments
Closed
2 tasks done

Add dynamic content to Social Icons #8097

wpsumo opened this issue May 12, 2019 · 7 comments
Milestone

Comments

@wpsumo
Copy link

@wpsumo wpsumo commented May 12, 2019

Prerequisites

  • I have searched for similar features requests in both open and closed tickets and cannot find a duplicate.
  • The feature is still missing in the latest stable version of Elementor ( Elementor Pro. )

What problem is your feature request going to solve? Please describe.
Missing dynamic feature in the Social Icons widget.

Describe the solution you'd like
Add dynamic content for Social Icons widget LINK/URL.

@shilo-ey
Copy link
Contributor

@shilo-ey shilo-ey commented May 13, 2019

In which use case do you see it come in hand?

@lcswillems
Copy link

@lcswillems lcswillems commented May 13, 2019 •

For displaying social buttons on a blog post, with author's social media links.

@wpsumo
Copy link
Author

@wpsumo wpsumo commented May 13, 2019

Additionally from what @lcswillems 👍 For using backend CMS of WordPress only for content management. Content users should never use elementor or templates. I want them to control such things and for it to be fetched dynamically not be static. For now, I'm forced to use list element but it does not allow me to add a background color to the list items icon so I'm limited in design.

But make no sense to not make it dynamic and I want to control everything in the template in theme builder which is great in elementor but still give content and other site managers control over this links through ACF.

@shilo-ey shilo-ey added this to the 2.6.0 milestone May 16, 2019
KingYes added a commit that referenced this issue May 16, 2019
Tweak: Added dynamic capabilities to link control in Social Icons widget closes #8097
@bentalgad
Copy link

@bentalgad bentalgad commented May 27, 2019

It's funny that you have for dynamic content in every field separately instead of just having the option to add dynamic fields any where just like in beaver builder which lets you add it even inside text and even multiple dynamic content's in one field.

@shilo-ey
Copy link
Contributor

@shilo-ey shilo-ey commented Jul 9, 2019

This issue has been resolved in Elementor v2.6.0

Feel free to update

Thanks!

@Morgunov-Vitaly
Copy link

@Morgunov-Vitaly Morgunov-Vitaly commented Aug 26, 2019

Hello, guys!
Could You tell me Why there's no condition logic for hiding Social icons with empty links?
I use social icon widget for the user single page template. And user may have one or more acconts in social networks. For now Social icons widget allow me to display dynamic content but without conditions. If I want to give users an ability to specify different social networks accounts I have to put in Social icons widget all possible variations, and all they will be displaying even with empty links. Conditional logic will let hide all empty icons.

@imagineboss
Copy link

@imagineboss imagineboss commented Sep 4, 2020 •

Hey all spent forever trying to find a solution to make this work with the individual social icons being dynamically shown whether they have an attached url or not while connected to ACF dynamic fields. Finally decided to do it via a shortcode while taking advantage of built in elementor classes. There really should be an option to dynamically display the icon if the URL is empty. But figured I would leave this here in case anyone else was having the same issue until it gets fixed.

function profile_social_icons_acf() {
    ?>
    <div class="elementor-element elementor-shape-circle elementor-grid-0 elementor-widget elementor-widget-social-icons" data-element_type="widget" data-widget_type="social-icons.default">
        <div class="elementor-widget-container">
            <div class="elementor-social-icons-wrapper elementor-grid">
                <?php if( get_field('facebook_page') ): ?>
                                <div class="elementor-grid-item" style="margin:0 2px;">
                        <a class="elementor-icon elementor-social-icon elementor-social-icon-facebook" href="<?php echo the_field('facebook_page'); ?>" target="_blank">
                            <span class="elementor-screen-only">Facebook</span>
                            <i class="fab fa-facebook"></i>					</a>
                    </div>
                <?php endif; ?>
                <?php if( get_field('twitter') ): ?>
                                <div class="elementor-grid-item" style="margin:0 2px;">
                        <a class="elementor-icon elementor-social-icon elementor-social-icon-twitter" href="<?php echo the_field('twitter'); ?>" target="_blank">
                            <span class="elementor-screen-only">Twitter</span>
                            <i class="fab fa-twitter"></i>					</a>
                    </div>
                <?php endif; ?>
                <?php if( get_field('instagram') ): ?>
                                <div class="elementor-grid-item" style="margin:0 2px;">
                        <a class="elementor-icon elementor-social-icon elementor-social-icon-instagram" href="<?php echo the_field('instagram'); ?>" target="_blank">
                            <span class="elementor-screen-only">Instagram</span>
                            <i class="fab fa-instagram"></i>					</a>
                    </div>
                <?php endif; ?>
                <?php if( get_field('youtube') ): ?>
                                <div class="elementor-grid-item" style="margin:0 2px;">
                        <a class="elementor-icon elementor-social-icon elementor-social-icon-youtube" href="<?php echo the_field('youtube'); ?>" target="_blank">
                            <span class="elementor-screen-only">Youtube</span>
                            <i class="fab fa-youtube"></i>					</a>
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
<?php
}
add_shortcode('profilesocial', 'profile_social_icons_acf');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants