• Resolved wwwchi

    (@wwwchi)


    Can I add it to my menu via “Appearance → Menus “?

    I’ve already install this pulgin.

    Putted this in index.php:
    <?php if( function_exists(‘ADDTOANY_SHARE_SAVE_KIT’) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>

    And in the Menus, adding a Custom Links:
    URL: https://www.addtoany.com/share_save
    Label: my icon
    Title Attribute: Share
    CSS Classes: a2a_dd

    It can work at original type, but can’t use new type what I setting via the pulgin.
    How can I do?
    Thanks a lot ??

    https://www.ads-software.com/plugins/add-to-any/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author micropat

    (@micropat)

    Neat idea. Yes, by modifying your theme, you can place the AddToAny sharing button in a WordPress navigation menu.

    For example, you could modify the following in some theme’s header.php file:

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>

    To this:

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'items_wrap' => '<ul id="%1$s" class="%2$s">'
        . ((function_exists('ADDTOANY_SHARE_SAVE_BUTTON')) ? ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>", "output_later" => TRUE) ) : '')
        . '%3$s</ul>' ) ); ?>

    This will vary from theme to theme.

    Alternatively, if you wanted to stick to the interface in “Appearance → Menus ” and have just 1 page shared (without the drop-down sharing menu), you could use this for the link URL:
    https://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.example.com%2Fwordpress%2F&title=My%20WordPress

    Thread Starter wwwchi

    (@wwwchi)

    Because modify theme’s file is not working.
    I use the second way : put link to my “Appearance → Menus ” (it is just 1 page).
    The “Additional Options” is working. I can style it.

    But “Standalone Services” is not working. (it shows the original version.)

    Thank you~

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can I add it to my menu ?’ is closed to new replies.