Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Disable theme post sharing options
New Landing › How can we help? › Themeforest Theme Support › Dante › Disable theme post sharing options
- This topic has 9 replies, 4 voices, and was last updated 10 years by Rui Guerreiro – SUPPORT.
-
Posted in: Dante
-
September 24, 2014 at 5:30 pm #114171
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!
September 25, 2014 at 5:53 am #114305Hi,
Go to that post, Below the editor Meta Options -> Post Meta -> Include social sharing. uncheck it.
Let us know,
Thanks,
laranz.September 26, 2014 at 9:18 am #114789Hi,
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
September 26, 2014 at 9:30 am #114795Hi,
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
MohammadSeptember 26, 2014 at 10:31 am #114831Hi,
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 ๐September 26, 2014 at 10:40 am #114833Hi,
Please copy this single.php at child theme and activated then you can avoid update issue.
Thanks ๐
With Best Regards
MohammadSeptember 26, 2014 at 1:19 pm #114898Hi 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!!
September 26, 2014 at 1:41 pm #114913Hi,
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.
ThanksSeptember 26, 2014 at 1:46 pm #114918Ok, 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!
September 26, 2014 at 5:49 pm #114986No. 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
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.