New Landing How can we help? Themeforest Theme Support Dante Disable theme post sharing options

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Dante
  • #114171
    JavierCane
    Member
    Post count: 45

    Hi!

    I already have the WordPress JetPack plugin Sharing options enabled and I want to disable the Dante sharing options in order to do not show them twice as you can see here: http://beisbolsantboi.com/resultados-copa-catalana-11_6388/

    The reason why I prefer the JetPack sharing options is because they respect the design of the different social networks. If I integrate the sharing options too much with the general design of the page, my users simply doesn’t see them :-/

    Thanks!

    #114305
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Go to that post, Below the editor Meta Options -> Post Meta -> Include social sharing. uncheck it.

    Let us know,

    Thanks,
    laranz.

    #114789
    JavierCane
    Member
    Post count: 45

    Hi,

    I did that for this post and it worked fine, but:

    • Is there any way to disable this at a Theme Preference level? I mean: I will not want that for any post, so It’s a pity having to uncheck that for every previous and future posts. Like “By default, set it as unchecked”.
    • At least, can you provide me a MySQL sentence in order to do that for all my previous posts in order to automate this task? (I have 923 posts)

    Thanks

    #114795
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit single.php.

    Find this code:-
    if ($show_social == "") {
    $show_social = true;
    }
    
    Change to:-
    if ($show_social == "") {
    $show_social = true;
    }
    $show_social = false;

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #114831
    JavierCane
    Member
    Post count: 45

    Hi,

    Thanks for your suggestion.
    Instead of overriding the value, I commented the assignation in order to avoid the query (taking into account that I’ll override it hardcoding it, I think that’s better).

    Final result (from single.php file, line 43):

    
    	// **** HACK ****
    	// Deshabilitamos las opciones sociales para que no se dupliquen con el tema:
    	// $show_social = sf_get_post_meta($post->ID, 'sf_social_sharing', true);
    	$show_social = false;
    	// **** HACK ****
    	$show_related =  sf_get_post_meta($post->ID, 'sf_related_articles', true);
    	$remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true);
    	
    	if ($show_author_info == "") {
    		$show_author_info = true;
    	}
    	// **** HACK ****
    	// Deshabilitamos las opciones sociales para que no se dupliquen con el tema:
    	// if ($show_social == "") {
    	// 	$show_social = true;
    	// }
    	// **** HACK ****
    

    It worked fine for all posts.

    The problem here is that I’m modifying a theme file, so I suspect that at the moment of updating it, I’ll lose this changes.

    If you allow me the suggestion, I really think that you should put that (don’t show the theme social options) as a theme option in the preferences panel.
    I think that since it’s pretty common to have the JetPack plugin and, as I said before, preferring the social networks “native” buttons, it seems a common scenario, and doing that, you will be avoiding the need of modify the theme files ๐Ÿ™‚

    #114833
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please copy this single.php at child theme and activated then you can avoid update issue.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #114898
    JavierCane
    Member
    Post count: 45

    Hi Mohammad, reading out about the style.css child theme in the Dante documentation, I get one doubt:

    Is it better to leave the custom CSS rules in the theme preferences or move them to the style.css of the child theme?

    I suppose that:
    * If I leave them in the preferences section, it will imply a DB query and them will be putted inline.
    * If I move them to the child theme, I’ll avoid the DB query but I’ll transfer one more file since they’ll be at a separated css file.

    Is it correct?
    What is better?

    Thanks!!

    #114913
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    DB query will run always If you leave them in the preferences section or not. We can override any css rule through theme options. Please dont move theme options css to anywhere.
    Thanks

    #114918
    JavierCane
    Member
    Post count: 45

    Ok, thanks for the advice.

    Then, it would be helpful to have that pointed out on the theme Documentation ๐Ÿ™‚

    BTW: Is there any way to automatize the export/import of the preferences (including menus, and so on) from the main theme to the child one?

    Thanks!

    #114986
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No. Only exporting the theme options from one side and importing on the other.
    The menus you will have to assign then once to the menu locations.

    -Rui

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register