• Resolved thatwastaxing

    (@thatwastaxing)


    Hi,

    I’ve added support for Pinterest, Instagram and Tumblr using the instructions on your site but it’s not working properly.

    I’ve enabled support for them on the plugin’s admin settings tab and I can see “Show User’s Pinterest link?” et al on the content tab.

    However, on the content tab, when I check the boxes to display Pinterst, Instagram and Tumblr then hit save, the boxes are unchecked again but the message box in yellow say the content and settings were updated.

    Here’s my code in functions.php:

    add_filter ('wp_biographia_contact_info', 'add_pinterest_support');
    function add_pinterest_support ($contacts) {
        // contacts = array (field => array (field => field-name, contactmethod => description))
        $contacts['pinterest'] = array (
            'field' => 'pinterest',
            'contactmethod' => __('Pinterest')
        );
        return $contacts;
    }
    
    add_filter ('wp_biographia_link_items', 'add_pinterest_link', 10, 2);
    
    function add_pinterest_link ($links, $icon_dir_url) {
        // links = array (field => array (link_title => title, link_text => text, link_icon => URL)
        $links['pinterest'] = array (
            'link_title' => __('Pinterest'),
            'link_text' => __('Pinterest'),
            'link_icon' => $icon_dir_url . 'pinterest.png'
            );
            return $links;
    }
    
    add_filter ('wp_biographia_contact_info', 'add_instagram_support');
    
    function add_instagram_support ($contacts) {
        // contacts = array (field => array (field => field-name, contactmethod => description))
        $contacts['instagram'] = array (
            'field' => 'instagram',
            'contactmethod' => __('Instagram')
        );
         return $contacts;
    }
    
    add_filter ('wp_biographia_link_items', 'add_instagram_link', 10, 2);
    
    function add_instagram_link ($links, $icon_dir_url) {
        // links = array (field => array (link_title => title, link_text => text, link_icon => URL)
        $links['instagram'] = array (
            'link_title' => __('Instagram'),
            'link_text' => __('Instagram'),
            'link_icon' => $icon_dir_url . 'instagram.png'
            );
            return $links;
    }
    
    add_filter ('wp_biographia_contact_info', 'add_tumblr_support');
    
    function add_tumblr_support ($contacts) {
        // contacts = array (field => array (field => field-name, contactmethod => description))
        $contacts['tumblr'] = array (
            'field' => 'tumblr',
            'contactmethod' => __('Tumblr')
        );
        return $contacts;
    }
    
    add_filter ('wp_biographia_link_items', 'add_tumblr_link', 10, 2);
    
    function add_tumblr_link ($links, $icon_dir_url) {
        // links = array (field => array (link_title => title, link_text => text, link_icon => URL)
        $links['tumblr'] = array (
            'link_title' => __('Tumblr'),
            'link_text' => __('Tumblr'),
            'link_icon' => $icon_dir_url . 'tumblr.png'
            );
            return $links;
    }

    https://www.ads-software.com/plugins/wp-biographia/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter thatwastaxing

    (@thatwastaxing)

    Hmm. Seems to be just a bug on the settings page as I’m able to see the fields on the profile page and the icons with links show up properly on the bios on posts.

    Plugin Author vicchi

    (@vicchi)

    The code looks correct … what I’d recommend is cutting this down to adding a single new contact method to start with, say Pinterest.

    Comment out or delete Instagram and Tumblr support from the code you’ve added to functions.php.

    You’ll need to check in 3 places that Pinterest support is working properly …

    1. Under Settings -> WP Biographia -> Admin and in the User Profile Settings section, ensure the check box for Enable support for Pinterest is checked and saved.

    2. Under Settings -> WP Biographia -> Content, ensure the check box for Show User’s Pinterest Link is checked and saved.

    3. Under Users -> Your Profile, ensure your Pinterest profile URL is entered and saved.

    I’ve just done all of the above steps on my local install and it’s working fine for me.

    If this doesn’t work for you, this could indicate that there’s a clash between WP Biographia and another plugin or your theme. In this case, go through the usual WordPress troubleshooting steps of swapping to a default, stock WordPress theme and disabling all other plugins.

    It would also help if you could post the plugin’s configuration settings under Plugin Configuration Settings on the plugin’s Colophon tab.

    -Gary

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding support for other social networks not working’ is closed to new replies.