Tagged: social icons
- This topic has 3 replies, 2 voices, and was last updated 9 years, 2 months ago by Theme Horse Support Team.
-
AuthorPosts
-
October 18, 2015 at 11:32 am #36726DanielParticipant
I´m using the last version of attitude theme and recently my social icons (top of page) disappeared.
Could you help me?
My site is:
Thanks in advance.
October 19, 2015 at 1:35 am #36740Theme Horse Support TeamKeymasterHi Daniel,
Did you created child theme or not? If you are using child theme then you need to add this below code in your child theme.
global $options, $array_of_default_settings; $options = wp_parse_args( get_option( 'attitude_theme_options', array() ), attitude_get_option_defaults());
instead of this code
global $attitude_theme_default; $options = $attitude_theme_default;
I just visited to your site but its not working. If you have any issue then let us know.
Thank you!
October 19, 2015 at 11:59 am #36750DanielParticipantHi, thanks for your help, I added the code
global $options, $array_of_default_settings;
$options = wp_parse_args( get_option( ‘attitude_theme_options’, array() ), attitude_get_option_defaults());Since I added this code I have not been able to use de Administrator Panel of WordPress (wp-admin) . Now I’m using the previous version of my functions.php (without your code).
I think that there are a problem since version 3.0.3 because I have redefined the functions attitude_socialnetworks in my child theme.
If you can´t view my site please clean your Browser’s cache and try again. Then, if you can´t view the site try this:
https://www.youtube.com/watch?v=mqMvrGnqA3A
ps: My Internet Service Provider did some changes in the configuration for you.
Folows functions.php of my child theme:
<?php
//************************ DD Para limpiar el menú de la barra de admin eliminando los las opciones de WordPress
function nwp_admin_bar() {
global $wp_admin_bar;$wp_admin_bar->remove_menu(‘wp-logo’);
$wp_admin_bar->remove_menu(‘about’);
$wp_admin_bar->remove_menu(‘wporg’);
$wp_admin_bar->remove_menu(‘documentation’);
$wp_admin_bar->remove_menu(‘support-forums’);
$wp_admin_bar->remove_menu(‘feedback’);
}
add_action( ‘wp_before_admin_bar_render’, ‘nwp_admin_bar’ );// ********** para que se vean los iconos de Redes Sociales que desaparecieron con la version 3.0.3
// global $options, $array_of_default_settings;
// $options = wp_parse_args( get_option( 'attitude_theme_options', array() ), //attitude_get_option_defaults());// ************************ DD cambio del logo
function my_custom_login_logo() {
echo ‘<style type=”text/css”>
h1 a { background-image:url(‘.get_stylesheet_directory_uri().’/images/logocliente.jpg) !important; }
</style>’;
}add_action(‘login_head’, ‘my_custom_login_logo’);
// ************************ DD cambio la URL donde enlaza el logo de la página de login
function put_my_url(){
return (‘http://www.lavistacasal.com’); // Enlace al sitio de La Vista Casal
}
add_filter(‘login_headerurl’, ‘put_my_url’);// ************************ DD cambio el texto emergente de la URL de página de login
function put_my_title(){
return (‘Desarrollado por Un Sitio Ya’); //
}
add_filter(‘login_headertitle’, ‘put_my_title’);// ************************ DD Cambio del texto del copyrigth
add_action( ‘init’ , ‘mh_remove_copy’ , 15 );function mh_remove_copy() {
remove_action( ‘attitude_footer’, ‘attitude_footer_info’, 30 );
}// Add my own copyright text
add_action( ‘attitude_footer’ , ‘mh_footer_info’ , 40 );function mh_footer_info() {
$output = ‘<div class=”copyright”, align=”center”>’.’Copyright 2015 – La Vista Casal – Av. del Libertador 6343 P.12 “A” – CABA (C1428ARG) – Buenos Aires, Argentina – Tel.: (54 11) 4786 0404 ‘.'</div><!– .copyright –>’;
echo do_shortcode( $output );
}// ************************ DD Agregado de un nuevo Widget para poder tener Texto abajo del Widget de DESTACADOS
add_action( ‘widgets_init’, ‘attitude_child_widgets_init’);
/**
* Function to register the widget areas(sidebar) and widgets.
*/
function attitude_child_widgets_init() {// Registering widgets
register_widget( “attitude_recent_work_child_widget” );
}/**
* Widget for business layout that shows Featured page title and featured image.
* Construct the widget.
* i.e. Name, description and control options.
*/
class attitude_recent_work_child_widget extends WP_Widget {
function attitude_recent_work_child_widget() {
$widget_ops = array( ‘classname’ => ‘widget_recent_work_child’, ‘description’ => __( ‘ * Use this widget to show recent work, portfolio or any pages as your wish ( Business Layout ).’, ‘attitude’ ) );
$control_ops = array( ‘width’ => 200, ‘height’ =>250 );
parent::WP_Widget( false, $name = __( ‘Theme Horse: Featured Widget’, ‘attitude’ ), $widget_ops, $control_ops);
}function form( $instance ) {
for ( $i=0; $i<4; $i++ ) {
$var = ‘page_id’.$i;
$defaults[$var] = ”;
}
$att_defaults = $defaults;
$att_defaults[‘title’] = ”;
$att_defaults[‘text’] = ”;
$instance = wp_parse_args( (array) $instance, $att_defaults );
for ( $i=0; $i<4; $i++ ) {
$var = ‘page_id’.$i;
$var = absint( $instance[ $var ] );
}
$title = esc_attr( $instance[ ‘title’ ] );
$text = esc_textarea($instance[‘text’]);
?><p>
<label for=”<?php echo $this->get_field_id(‘title’); ?>”><?php _e( ‘Title:’, ‘attitude’ ); ?></label>
<input id=”<?php echo $this->get_field_id(‘title’); ?>” name=”<?php echo $this->get_field_name(‘title’); ?>” type=”text” value=”<?php echo $title; ?>” />
</p>
<?php _e( ‘Description’,’attitude’ ); ?>
<textarea class=”widefat” rows=”10″ cols=”20″ id=”<?php echo $this->get_field_id(‘text’); ?>” name=”<?php echo $this->get_field_name(‘text’); ?>”><?php echo $text; ?></textarea>
<?php
for( $i=0; $i<4; $i++) {
?>
<p>
<label for=”<?php echo $this->get_field_id( key($defaults) ); ?>”><?php _e( ‘Page’, ‘attitude’ ); ?>:</label>
<?php wp_dropdown_pages( array( ‘show_option_none’ =>’ ‘,’name’ => $this->get_field_name( key($defaults) ), ‘selected’ => $instance[key($defaults)] ) ); ?>
</p>
<?php
next( $defaults );// forwards the key of $defaults array
}
}function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance[ ‘title’ ] = strip_tags( $new_instance[ ‘title’ ] );
for( $i=0; $i<4; $i++ ) {
$var = ‘page_id’.$i;
$instance[ $var] = absint( $new_instance[ $var ] );
}
if ( current_user_can(‘unfiltered_html’) )
$instance[‘text’] = $new_instance[‘text’];
else
$instance[‘text’] = stripslashes( wp_filter_post_kses( addslashes($new_instance[‘text’]) ) ); // wp_filter_post_kses() expects slashed
$instance[‘filter’] = isset($new_instance[‘filter’]);return $instance;
}function widget( $args, $instance ) {
extract( $args );
extract( $instance );global $post;
$title = isset( $instance[ ‘title’ ] ) ? $instance[ ‘title’ ] : ”;
$text = apply_filters( ‘widget_text’, empty( $instance[‘text’] ) ? ” : $instance[‘text’], $instance );
$page_array = array();
for( $i=0; $i<6; $i++ ) {
$var = ‘page_id’.$i;
$page_id = isset( $instance[ $var ] ) ? $instance[ $var ] : ”;if( !empty( $page_id ) )
array_push( $page_array, $page_id );// Push the page id in the array
}
$get_featured_pages = new WP_Query( array(
‘posts_per_page’ => -1,
‘post_type’ => array( ‘page’ ),
‘post__in’ => $page_array,
‘orderby’ => ‘post__in’
) );
echo $before_widget;
if ( !empty( $title ) ) { echo $before_title . esc_html( $title ) . $after_title; } ?>
<p><?php echo esc_textarea( $text ); ?></p>
<div class=”column clearfix”>
<?php
while( $get_featured_pages->have_posts() ):$get_featured_pages->the_post();
$page_title = get_the_title();
?>
<div class=”one-fourth”>
<?php
if ( has_post_thumbnail( ) ) {
echo ‘‘.get_the_post_thumbnail( $post->ID,’gallery’).’‘;
}
?>
<h3 class=”custom-gallery-title”>” title=””><?php echo $page_title; ?></h3>
<article>
<?php the_excerpt(); ?>
</article>” title=”Ampliar”>Ver más +
</div><!– .one-fourth –>
<?php endwhile;
// Reset Post Data
wp_reset_query();
?>
</div><!– .column –>
<?php echo $after_widget;
}
}
//****************************** DD CAMBIO TEXTO DE MySpace por Time Report en icono de redes sociales ————-function attitude_socialnetworks( $flag ) {
global $attitude_theme_options_settings;
$options = $attitude_theme_options_settings;$attitude_socialnetworks = ”;
if ( ( !$attitude_socialnetworks = get_transient( ‘attitude_socialnetworks’ ) ) && ( 1 == $flag ) ) {$attitude_socialnetworks .=’
<div class=”social-profiles clearfix”>- ‘;
$social_links = array();
$social_links_name = array();
$social_links_name = array( __( ‘Facebook’, ‘attitude’ ),
__( ‘Twitter’, ‘attitude’ ),
__( ‘Google Plus’, ‘attitude’ ),
__( ‘Pinterest’, ‘attitude’ ),
__( ‘Youtube’, ‘attitude’ ),
__( ‘Vimeo’, ‘attitude’ ),
__( ‘LinkedIn’, ‘attitude’ ),
__( ‘Flickr’, ‘attitude’ ),
__( ‘Tumblr’, ‘attitude’ ),
__( ‘Time Report’, ‘attitude’ ),
__( ‘RSS’, ‘attitude’ )
);
$social_links = array( ‘Facebook’ => ‘social_facebook’,
‘Twitter’ => ‘social_twitter’,
‘Google-Plus’ => ‘social_googleplus’,
‘Pinterest’ => ‘social_pinterest’,
‘You-tube’ => ‘social_youtube’,
‘Vimeo’ => ‘social_vimeo’,
‘Linked’ => ‘social_linkedin’,
‘Flickr’ => ‘social_flickr’,
‘Tumblr’ => ‘social_tumblr’,
‘My-Space’ => ‘social_myspace’,
‘RSS’ => ‘social_rss’
);$i=0;
foreach( $social_links as $key => $value ) {
if ( !empty( $options[ $value ] ) ) {
$attitude_socialnetworks .=
‘<li class=”‘.strtolower($key).'”>‘.get_bloginfo( ‘name’ ).’ ‘.$social_links_name[$i].’‘;
}
$i++;
}$attitude_socialnetworks .=’
</div><!– .social-profiles –>’;
set_transient( ‘attitude_socialnetworks’, $attitude_socialnetworks, 86940 );
}
echo $attitude_socialnetworks;
}
?>
October 21, 2015 at 2:03 am #38694Theme Horse Support TeamKeymasterHi Daniel,
If you want to use the latest version of our theme then you need to add this below codeglobal $options, $array_of_default_settings; $options = wp_parse_args( get_option( 'attitude_theme_options', array() ), attitude_get_option_defaults());
instead of this code
global $attitude_theme_default; $options = $attitude_theme_default;
If you are still getting error in theme then you need to make compatible with our latest version using child theme. Because as of wordpress.org guidelines we cannot move back creating the theme options.
If are having this issue then you can use the old version of interface theme. Download from here
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.