E
E
ele_tulina2015-02-28 17:56:05
Facebook
ele_tulina, 2015-02-28 17:56:05

How to change the code of the "Share" buttons for Facebook and Vkontakte so that they work in the mobile version of the site?

Guys, I would be very grateful if you can help. I left the block of "Share" buttons set in the template on the site , but then it turned out that the Facebook and Vkontakte buttons do not work in the mobile version (there is a transition in Facebook, but on the page that opens there is only an empty window with a suggestion to insert a link and then share; Vkontakte affairs the situation is better: the news itself is shared with a picture, but the reader does not see what is being shared, because only a link is displayed in the window that opens). Can you tell me how to modify the code so that it starts working correctly?
There he is:

printf( '<li class="facebook-share"><a href="http://www.facebook.com/sharer/sharer.php?s=100&amp;p[url]=%1$s&amp;p[images][0]=%2$s&amp;p[title]=%3$s" target="_blank" class="et-share-button et-share-facebook">%4$s</a></li>',
                  esc_url( $post_permalink ),
                  esc_attr( $thumbnail[0] ),
                  $title_attribute,
                  esc_html__( 'Facebook', 'Nexus' )
                );

printf( '<li class="vkontakte-share"><a href="http://vkontakte.ru/share.php?url=%1$s&amp;text=%2$s" target="_blank" class="et-share-button et-share-vkontakte">%3$s</a></li>',
                  esc_url( $post_permalink ),
                  $title_attribute,
                  esc_html__( 'Vkontakte', 'Nexus' )
                );

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question