Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
RiouParticipant
Hello?
RiouParticipantHelp anyone?
RiouParticipant*Bump
Has anyone had luck inserting this function inside the child theme? If none, kindly guide me to the right direction.
add_action( ‘init’, ‘attitude_remove_parent_function’ ); /** * Removes parent function attached to hook */ function attitude_remove_parent_function(){ remove_action( ‘attitude_header’, ‘attitude_headerdetails’, 10 ); } add_action( ‘attitude_header’, ‘attitude_child_headerdetails’, 10 ); /** * Add your custom function */ function attitude_child_headerdetails() { // Copy all the content inside the attitude_headerdetails function of parent theme, paste here and make necessary changes here. global $attitude_theme_options_settings; $options = $attitude_theme_options_settings; $elements = array(); $elements = array( $options[ 'social_facebook' ], $options[ 'social_twitter' ], $options[ 'social_googleplus' ], $options[ 'social_linkedin' ], $options[ 'social_pinterest' ], $options[ 'social_youtube' ], $options[ 'social_vimeo' ], $options[ 'social_flickr' ], $options[ 'social_tumblr' ], $options[ 'social_myspace' ], $options[ 'social_rss' ] ); $flag = 0; if( !empty( $elements ) ) { foreach( $elements as $option) { if( !empty( $option ) ) { $flag = 1; } else { $flag = 0; } if( 1 == $flag ) { break; } } } if( 0 == $options[ 'hide_header_searchform' ] || 1 == $flag ) { <a class="telnumber" href="tel:240-415-8323">Call Now: 240-415-8323</a> attitude_socialnetworks( $flag ); if( 0 == $options[ 'hide_header_searchform' ] ) get_search_form(); </section><!-- .hgroup-right --> } }
Thank you for the wonderful theme!
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)