Jump to content

Archived

This topic is now archived and is closed to further replies.

Frederic

custom css disappear when i add sharing codes in widget

Recommended Posts

Frederic

Hi!

 

A bit of a misadventure today ...

 

I tried some social sharing codes from www.addthis.com and it was ok until I realised all the custom css I had added had disappeared and some of the global settings had gone ...

 

I inserted the codes in widget --> text box  in wp-admin and then in widgetiser in dms.

 

I have removed everything but I suspect there are some bits of something left undeleted because when I load templates in pages, the sections are loaded but not the settings or contents within those sections like it used to be before.

 

This is the second time I have problems with social sharing buttons - the first time happened when I installed a social plugin from wordpress and had issues with the sections also.

 

Can you guide me on what to do to clear that?

 

Many thanks

 

 

 

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

What code have you added and have you added it to a Text Widget or TextBox ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Frederic

Hi Danny,

 

I added them in a tex widget.

 

Here are the codes

 

 

<!-- AddThis Button BEGIN -->

<div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="left:50px;top:50px;">

<a class="addthis_button_facebook_send"></a>

<a class="addthis_button_tweet" tw:count="vertical"></a>

<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>

<a class="addthis_button_linkedin_counter" li:counter="top"></a>

</div>

<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>

<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52a56d8b199ad2fb"></script>

<!-- AddThis Button END -->

Share this post


Link to post
Share on other sites
Danny

You shouldn't add JavaScript to the TextBox or TextWidget, add it to the custom scripts editor in DMS Toolbar > Custom > Custom Scripts.

 

So add the following to the TextWidget:

 

<div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="left:50px;top:50px;">
<a class="addthis_button_facebook_send"></a>
<a class="addthis_button_tweet" tw:count="vertical"></a>
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
<a class="addthis_button_linkedin_counter" li:counter="top"></a>
</div>
 
Add the following to the  DMS Toolbar > Custom > Custom Scripts.
 

script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>

<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52a56d8b199ad2fb"></script>

 

Either way, this shouldn't be removing custom CSS or effecting your global settings.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Frederic

Thanks Danny, I will try it.

 

What about the issue of templates not loading fully - sections are loading but not their content - it started after I had this problem. Do you think it may be some files left.

 

I am asking this because it happened recently with a cache plugin where we had to delete a file that was left in c-panel after i deleted the plugin.

Share this post


Link to post
Share on other sites
Danny

The templates not loading could be related to either the cache plugin you mentioned above or the code you used for the AddThis, it could very well have wiped your settings.

 

Cache plugins should only be used upon the completion of your sites design/layout and you need to configure them correctly, you can not simply install and active them. Cache plugin needs to be configured correctly to match your servers setup, if they aren't they will either have a negative effect on performance or cause all kinds of issues. You need to read the documentation carefully and I would also recommend contacting your host provider for assistance with them.

 

In regards to your templates not working as intended, I would recommend disabling all active plugins except for DMS Pro Tools and remove all custom CSS and scripts and see if this resolves the issue. If it doesn't you may want to contact your web host provider and ask them if they can restore from a previous backup, prior to the time this issue triggered.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Frederic

Thanks for the useful info.

 

I try and let you know.

Share this post


Link to post
Share on other sites
Danny

Ok, thanks.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Frederic

Hi Danny,

 

I have tried and tested and it is ok for most of it except one page that do not want to save as new template and one template (related to the same page) that do not load fully - sections are in place but some of the content in text boxes is lost.

Share this post


Link to post
Share on other sites
Danny

Is there anything unique to that page that differs from the others ?

If so, try removing it, this could be a custom script, a widget or a plugin and see if this resolves your issue.

 

You could also be running into a saving issue, where your settings aren't saving correctly, this issue has already been fixed and will be available in an upcoming patch. To get around this issue for the time being, do the following for both section settings and custom CSS.

 

1. When you have configured your section/added your custom CSS.

2. Click on a new area this can be anywhere as long as you stay inside the DMS Toolbar window, for example you have just added some custom CSS, now click outside of the editor.

3. This will trigger the Saving progression icon (next to Publish), once this has completed and disappears, click Publish and your settings/custom CSS should be saved correctly.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Frederic

Thanks Danny.

 

Happy to know the saving issue will be sorted out because it played a few trick on me ... yes, I am following that procedure and it helps a lot.

 

I think the template issue is related to the page. I will redo it, delete the old and see if it is ok.

 

There is another such issue where one background image form one template has ended up in another section in another template !!!

The first time it happened, I closed the site and it was gone when I reopened.

But it has come back and it seems to be int he template.

 

So ehre again, there may have been strange things with my code problem so i will also redo this page, and delete the old template/page and see if it is ok.

 

MAny thanks for your support

Share this post


Link to post
Share on other sites
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×