Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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?

    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.

    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?

    • 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!

Viewing 4 replies - 1 through 4 (of 4 total)