2 More Social Networks? (12 posts)

  1. Jeffrey Keefer
    Posted 1 year ago #

    I am exploring your theme and really like how robust it is. Thanks for sharing with us!

    One question -- I want to add 2 more social networks that you do not have available -- Academia.edu and ResearchGate. How can I add them as options and perhaps upload or link to Social Icons buttons for them?

    Thank you!

  2. stephencottontail
    Posted 1 year ago #

    Looking at Dinky, it looks like there are three files to edit:
    inc/theme-options.php adds social media options to the theme options page
    social.php tells WordPress to display social media icons on the home page
    css/social-icons.css controls how the icons are displayed

    Editing those three files (or creating a child theme) will get you where you want to go.

  3. Jeffrey Keefer
    Posted 1 year ago #

    Thanks. I will try to adjust that and then report back here.

    One follow-up. I cannot see where the current icons are located, as I need to make sure that I know the size and format for the new ones I need. Any idea where those files are?

    I would love icons that would match, though do not think that will be possible so may need to replace the others already there that I will still use.


    Thank you again.

  4. stephencottontail
    Posted 1 year ago #

    According to css/social-icons.css, the icons are done with an icon font located at font/social-icons.eot, which is a bit more involved than simply swapping in icons. You would either have to edit the font directly (which may run into licensing and copyright issues), download a different icon font that includes the icons you need, or download a different set of icons and completely recode the theme to use them instead of an icon font.

  5. Jeffrey Keefer
    Posted 1 year ago #

    Wow, that sounds complicated!

    I only need 6 icons; would it be easier to upload only those and be done with it? If so, can you provide some guidance how to code it so they point to these new icons?

    Thanks again!

  6. stephencottontail
    Posted 1 year ago #

    Yeah, using an icon font makes it a bit complicated to add new social media icons after the fact. You could do something like this: Upload the icons to the server and make a note of their path, width, and height. You'd then have to edit inc/theme-options.php, social.php, and css/social-icons.css with something like this:

    add_settings_field( 'social_researchgate', __( 'ResearchGate', 'dinky' ), 'dinky_settings_field_social_researchgate', 'theme_options', 'general' );
    <?php if ( dinky_get_theme_option( 'social_researchgate' ) != '' : ?>
        <li><a class="social-researchgate" href="<?php echo dinky_get_theme_option( 'social_researchgate' ) ?>" title="<?php _e( 'ResearchGate', 'dinky' ); ?>ResearchGate</a></li>
    <?php endif; ?>
    .social_researchgate {
        background: url(fill in the path to your uploaded icons);
        display: inline-block;
        width: (width of your uploaded icon);
        height: (height of your uploaded icon);

    And then repeat that code for each new social media network you'd like to add. Good luck.

  7. Jeffrey Keefer
    Posted 1 year ago #

    Thanks; this will be tonight's project; will check in and let you and everybody know how it goes. Thank you very much.

  8. Jeffrey Keefer
    Posted 1 year ago #

    OK, I tried all of this, and I now get this error on the Dinky Themes Options page next to ResearchGate and Academia.edu (at least they both appear on the list now :-) ):

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'dinky_settings_field_social_researchgate' not found or invalid function name in /usr/home/jeffreykeefer/public_html/jeffreykeefer/wp-admin/includes/template.php on line 1176

    Not sure what this means . . .

  9. Jeffrey Keefer
    Posted 1 year ago #

    Tried to tweak the code, though not being a programmer I am now afraid of making a mess. Still the same error message :-(

    Anybody, suggestions?

  10. stephencottontail
    Posted 1 year ago #

    My fault. I left out an edit that needs to be made to inc/theme-options.php. You need to actually define the functions there as well. Look at the lines that start with function dinky_settings_field_social_xxx() to see how the functions need to be defined.

  11. WPyogi
    Forum Moderator
    Posted 1 year ago #

    It really would be advisable to make these changes in a child theme so that they are not lost when the theme is updated...


  12. Jeffrey Keefer
    Posted 1 year ago #

    Thanks, though I just cannot get this to work properly. I wish I could learn enough coding to make this all work, though that seems beyond me at this time.

    Is there anybody I can hire to fix it?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic