• I am very new to all of this, so forgive me if this is simple. I need to add an instagram button on the Author Bio. I have a child site added, but cannot seem to figure out how to add instagram along with facebook and twitter.

Viewing 7 replies - 1 through 7 (of 7 total)
    • Step 1
    • Install the Font Awesome plugin(this will give you the instagram icon) link
    • Step 2
    • Go to you wordpress admin page >> click Apperance >> and Editor
    • Now that you are in the editor for Duena you need to click on options.php and do a find(Ctrl+f) for g_author_bio_social_twitter this will take you to the first thing you need to add. Copy
      $options['g_author_bio_social_twitter'] = array( "name" => __( "Author Twitter URL", "duena" ),
      							"desc" => __( "Enter Author Twitter URL", "duena" ),
      							"id" => "g_author_bio_social_twitter",
      							"type" => "text",
      							"class" => "hidden",
      							"std" => "#");

      and paste it blow the code you just copied so you have a new copy of it.

    • now change all the mentions of Twitter/twitter with Instagram/instagram
      $options['g_author_bio_social_instagram'] = array( "name" => __( "Author Instagram URL", "duena" ),
      							"desc" => __( "Enter Author Instagram URL", "duena" ),
      							"id" => "g_author_bio_social_instagram",
      							"type" => "text",
      							"class" => "hidden",
      							"std" => "#");
    • next do a find again(your search should still be there) and hit enter till you get to this:
      /* g_author_bio_social_twitter */
      		$wp_customize->add_setting( 'duena[g_author_bio_social_twitter]', array(
      				'default' => $options['g_author_bio_social_twitter']['std'],
      				'type' => 'option'
      		) );
      		$wp_customize->add_control( 'duena_g_author_bio_social_twitter', array(
      				'label' => $options['g_author_bio_social_twitter']['name'],
      				'section' => 'duena_header',
      				'settings' => 'duena[g_author_bio_social_twitter]',
      				'type' => $options['g_author_bio_social_twitter']['type'],
      				'priority' => 18
      		) );

      do a copy of this block of code and we are going to replace all the mentions of twitter with instagram, put this block of code at then end where you see the priority 22(rss) so you can just give it priority 23

    • now it gets a little complicated, the creator didnt give you access to functions.php so you will need to go to your server and in /wp-content/themes/duena/fucntions.php you will find this block of code:
      if ( '' != of_get_option('g_author_bio_social_twitter') ) {
                              echo "<a href='".esc_url( of_get_option('g_author_bio_social_twitter') )."'><i class='icon-twitter'></i></a>\n";
                      }

      you can find this by searching for twitter. you will need to copy this bit of code and replace all the twitters with instagram

    easy huh!

    @bakerj417 – what happens to these changes when the theme is updated?

    they go bye bye, just dont update the theme???, i am new to wordpress are these themes on some verison control such as git or something so i can pull request to add in changes?

    The best/standard approach is to use a child theme – http://codex.wordpress.org/Child_Themes ; the OP already has that set up – so your suggested changes should be explaining how to do that in a child theme.

    Not updating a theme isn’t a good solution – as it may eventually result in compatibility or security issues.

    If you want to suggest theme code changes, the best way is to post on the theme’s own forum – where the developer will see it. In fact, this thread really should have been posted there in the first place – we usually ask people to re-post there, but evidently that didn’t happen in this case.

    http://wordpress.org/support/theme/duena

    Note that some developers are quite active on these forums, others are not at all…

    sweet… I read original post and didn’t know she was talking about child theme, to be honest had know idea what a child theme was like I said I am new to wordpress. Thanks for the link I have to make these changes to my wife’s site so if I figure that out I will share!

    thanks for the response WPyogi.

    Great! Child themes are definitely the way to go – and I’m sure your changes will be helpful to other people as well.

    it looks to me like there is now way to overwrite or add to a function in functions.php of the parent theme. I was able to add the options easily enough but the function that makes it display is in functions.php and there is no way to just add in the new social links. any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding Instagram Button to Duena Theme’ is closed to new replies.