Bug with AddThis Wordpress plugin - wordpress

I got two pages:
1-http://www.aotopo.com.br/servicos/
2-http://www.aotopo.com.br/blog/
In both pages I inserted The addThis plugin.
Local testing is perfect for both, but online just the first one is working.
In 2nd the addThis plugin is located at post-content (just before the "Leia Mais" buttons).
(function help(){
if(somebodyKnowWhy){
pleaseHelpMe();
console.log("Thank you!");
}
})()

If somebody stumbled up in the same issue, I found the answer by a Wordpress.org member (srijith.v) when I asked the same question:
#Erick: I couldn't find addthis_widget.js being imported to the page. How did you add AddThis? Did you use the plugin available for WordPress?
You will need to include http://s7.addthis.com/js/300/addthis_widget.js to the page to render the buttons.
I just added this js to my footer as a source of a script tag and voila.

Related

How to find out where a script-tag has been defined in the wordpress-header?

I have to work in a wordpress project of a former colleague. But I cannot figure out how he added an link-address to a script into the header of each page. After a global search, the link-address was found inside the sql dump of the wordpress project. I could not find any plugin he might have used. I would like to change the link-address. Any idea, how he added it?
<script src="http://custom-link/page.js" type="text/javascript" defer=""></script>
It was added by the wordpress plugin divi builder.
Divi Theme Options
To add a code to every page navigate to Divi Theme Options > Integration tab.
Make sure the “Enable header code” option is checked, and paste your code below.

Dashicons in wordpress (frontend) won't display

I'm creating a website in WordPress. I'm using dashicons for rating (manually) holidays.
It used to work, but after update the dashicons won't be visible for non-logged in users. Only, if you login, you can see the star ratings.
The star rating should be visible on the left top of each holiday deal.
Who knows a solution?
Website url is www.ikwilopvakantie.nl
Dashicons is the official icon font of the WordPress admin as of 3.8..
To load Dashicons for non logged in users:
Open directory {your-website-folder/wp-content/themes/}
Go into the folder of your active child theme ( if you don't have active child theme, open the folder of your active parent theme )
Find there functions.php file and add the provided code at the end of it (
make sure, there isn't ?> php closing tag at the end of file. if so, just remove it ):
function ww_load_dashicons(){
wp_enqueue_style('dashicons');
}
add_action('wp_enqueue_scripts', 'ww_load_dashicons');
Save changes. Dashicons will loads on your website for all users.
EDIT: there may be some plugin/code, which removed Dashicons from pages. Try to change your code with this one:
function ww_load_dashicons(){
wp_enqueue_style('dashicons');
}
add_action('wp_enqueue_scripts', 'ww_load_dashicons', 999);
Try this:
<span class="bx-next dashicons dashicons-arrow-right-alt2"></span>
'dashicons-arrow-right-alt2' is the class of the icon.
You can find them here: https://developer.wordpress.org/resource/dashicons/#arrow-up-alt
This has to go to your functions.php file:
function load_dashicons(){
wp_enqueue_style('dashicons');
}
add_action('wp_enqueue_scripts', 'load_dashicons');
For me the problem was simply that my browser blocker addons weren't allowing the source of dashicons.css
If you're using the plug-in "Asset CleanUp", you can navigate to "BULK CHANGES" and easily use "Remove site-wide rule" at the line, where the url for "dashicon" is listed.
Many of the icons on the official list were appearing blank for me when defined as a value of the menu-item property in the register_post_type function.
If you open wp-includes/css/dashicons.css you will see a complete list of icons available, many of which have different names, for example dashicons-quote is actually dashicons-editor-quote.
Using these values solved the problem for me. I also found this cheat sheet to be helpful if you don't want to go digging through your source files.
Solved for me— For some reason, dashicons was only not rendering when I wasn't accessing the https:// version of the site.

Visual composer WordPress plugin tabs not working

After I updated my WordPress, the content of the visual composer plugins in tabs are not displaying properly. They are showing up as a sequential list. Can anyone direct me on how to go about fixing it?
The tabs in the backend editor look ok:
The actual page shows them as a list:
Thanks!
may be you forgot to add body class, for reference check this <body <?php body_class(); ?>>`

Issue with Main Page Navigation not Updating after pointing site to directory

I’ve built a site for a client using a one-page WordPress theme: motorarzt.com
The main navigation on the home page uses Anchors to scroll to the different pages.
I put WordPress in a directory /ma/ and then updated the index.php file and the htacess file as normal. On the main home page the URLS are working fine - and also working fine on the sidebar.
The problem is when I go to a single page with this theme, the main navigation URLs are still showing the directory. Here’s an example: motorarzt.com/services/
The links should be http://motorarzt.com/#services NOT http://motorarzt.com/ma#services
Really hoping someone here can help me out...wondering if this is an issue with how the theme is developed and how i may tweak/fix it.
The theme developer provided me this code to add to the "extra javascript" area in the theme option panel - but it DID NOT work. Then he said he's no longer supporting it.
jQuery (document).ready(function($){
$ ("#menu a").each(function(){
var old_a = $(this).attr("href");
var new_a = old_a.replace("ma", "")
$(this).attr("href", new_a)
})
thanks!
Lisa
Try putting semicolons on the last three lines:
var new_a = old_a.replace("ma", "");
$(this).attr("href", new_a);
});
Also, if you're using a recent version of jQuery, replace attr() with prop().
Oh and if you have caching enabled you should flush all of them. I use Drupal not Wordpress but I'm guessing it's there too.

Wordpress bug and errors

I have a site that is almost fixed, but I'm having some errors... So I tried to reinstall the theme but Wordpress remembers all the settings from before (header, etc)... The problem that caused this to happen is that the site has a white bar on the side that doesn't need to be there, and it shrinks the site in half... Both on my laptop, desktop and iphone. Also, the slider doesn't display my featured slides. I get this error at the top of the page when trying to add a new slider:
Notice: wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/setli/public_html/wp-includes/functions.php on line 2944
Here's the site in question.
I'll hire someone to help me get this fixed asap and pay you via Paypal.
There is a large image (1600px wide) in your navigation area at the top of the page. This image is causing the entire site to get pushed outward and offset the containing div.
You need to add this to your CSS to fix:
#logo {
width: 100%;
overflow: hidden;
}
As for the error you put in your question, I do not see that anywhere. I would suggest completely deleting your theme from the server, and then download/install it again. Have you updated the theme recently? When did these issues start occurring?
Also, it looks like two themes are being using. Are you using a framework and a child theme? Try changing/disabling the child theme.
Quote:
Notice: wp_deregister_script was called incorrectly. Scripts and
styles should not be registered or enqueued until the
wp_enqueue_scripts, admin_enqueue_scripts, or init hooks.
Are you calling the function containing wp_deregister_script directly? Those functions should be called by using actions. Instead of calling that function directly, you should use add_action('wp_enqueue_scripts', 'your_function_name'); to run that function.
You use admin_enqueue_scripts instead of wp_enqueue_script if the script is meant for the WordPress dashboard.
Read more:
admin_enqueue_scripts()
wp_enqueue_script()

Resources