social share

  • Author
    Posts
  • rlbeor

    I have a code to share on social networks. Injected this code into page.php

    <div class="buttons">
    <!-- Facebook -->
    <a target="_blank" rel="nofollow" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="facebook" aria-label="Поделиться в Фейсбуке" title="Поделиться в Фейсбуке"><i class="fa fa-facebook-official" aria-hidden="true"></i></a>
     
    <!-- Telegram -->
    <a target="_blank" rel="nofollow" href="https://telegram.me/share/url?url=<?php the_permalink(); ?>" class="telegram" aria-label="Отправить в Телеграм" title="Отправить в Телеграм"><i class="fab fa-telegram-plane"></i></a>
     
    <!-- Viber -->
    <a target="_blank" rel="nofollow" href="viber://forward?text=<?php the_permalink(); ?>%0D%0A%0D%0A<?php the_title(); ?>" class="viber" aria-label="Отправить в Вайбер" title="Отправить в Вайбер"><i class="fab fa-viber"></i></a>
     
    <!-- Twitter -->
    <a target="_blank" rel="nofollow" href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>" class="twitter" aria-label="Поделиться в Твиттере" title="Поделиться в Твиттере"><i class="fab fa-twitter"></i></a>
     
    <!-- Google+ -->
    <a target="_blank" rel="nofollow" href="https://plusone.google.com/_/+1/confirm?hl=ru&url=<?php the_permalink(); ?>" class="google" aria-label="Отправить в Гугл+" title="Отправить в Гугл+"><i class="fab fa-google-plus-g"></i></a>
     
    <!-- VK -->
    <a target="_blank" rel="nofollow" href="https://vk.com/share.php?url=<?php the_permalink(); ?>" class="vkontakte" aria-label="Поделиться в VK" title="Поделиться в VK"><i class="fab fa-vk"></i></a>
     
    <!-- Odnoklassniki -->
    <a target="_blank" rel="nofollow" href="http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl=<?php the_permalink(); ?>&title=<?php the_title(); ?>" class="odnoklassniki" aria-label="Поделиться в Одноклассниках" title="Поделиться в Одноклассниках"><i class="fab fa-odnoklassniki"></i></a>
     
    <!-- Whatsapp -->
    <a target="_blank" rel="nofollow" href="whatsapp://send?text=<?php the_permalink(); ?>%0D%0A%0D%0A<?php the_title(); ?>" class="whatsapp" aria-label="Отправить в Ватсап" title="Отправить в Ватсап"><i class="fab fa-whatsapp"></i></a>
    </div>

    Buttons appeared only on pages. And there are no buttons in the announcements (((tell me?

    ihordeveloper

    Please try using some third-party plugin instead of code customizations, for example this one https://wordpress.org/plugins/add-to-any/ You can add floating share buttons to listings.

    rlbeor

    i tried this plugin. it only adds buttons to pages. but there are no buttons under the announcements.

    rlbeor

    in which file should you add? where ads are displayed

    ihordeveloper

    You don’t have to edit any files, please try using this plugin instead (if the first one doesn’t work for you) https://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar/ Once you install it you can check “Listing” post type in its settings and the floating share buttons will appear on the listing page.

    ihordeveloper

    You can check how it looks on this site built with HivePress https://divulga.gratis/

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.