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

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.

Related

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(); ?>>`

Where is the metadata robots no index, no follow in my wordpress site comming from?

This is my wordpress site: linearedge.com
If you check the source code you will find:
<meta content="noindex,nofollow" name="robots">
I'm not using ANY SEO plugin, so, where is this coming from? I also checked my header.php and that line isn't there.
Thanks.
Its getting put in there by the call to wp_head() in the header.php file of your theme. Check your Search Engine Visibility setting (Settings > Reading). Make sure that box is unchecked.

Bug with AddThis Wordpress plugin

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.

Using the WordPress TinyMCE in an HTML iframe for plugin

I have a WordPress plugin with settings page. On this settings page, the form to be submitted is loaded in an iframe. I wish to utilize the WordPress TinyMCE for a textarea in this form.
How do I achieve this? I can't really do it the way it is stated here (http://keighl.com/post/tinymce-in-wordpress-plugins/) since the form is present in an HTML file.
WORDPRESS 3.5 UPDATE BELOW
If you're using Wordpress version<3.0, you can use the post you referenced to, it's great.
If your wordpress version is above 3.0 (aka newer versions) you can't use the wp_tiny_mce function for the tiny_mce, because it's deprecated. You need the newer function, wp_editor, which you can read all about it in here:
http://codex.wordpress.org/Function_Reference/wp_editor
For you to use of the wp_editor function and other WP elements your iframe (the for now containing only html and not linked into wp), you need to make your the iframe html file a php file, and add a require function of wp-load.php file.
For example, if your iframe file is in your server's root folder with your wordpress install, all you need to do is to place the following in the top of your file:
<?php
require('./wp-load.php');
?>
//iframe html/php code here
After you do that you can use any wordpress function in your iframe, including the tiny_mce.
---- UPDATE ----
If you are using wordpress 3.5 or higher, the implement method has slightly changed. more information is right in this short tutorial

admin template selection is missing on page creation in wordpress 3.2.x

I am using WordPress 3.2.1 ,
Page template selection drop down is missing on Pages (Add,Edit)
wp-admin > Pages >Add New > Page Attributes
I Edit the Template Page Default page as below code
/*
Template Name: New Template
*/
But still the template drop down no visible , my older version of WordPress it display by default.
Following is the screen shot for more idea
I solved this problem solved by adding the typical following code:
/*
Template Name: Custom
*/
Don't add any spaces after Name:
It'll work if you use template name: as well.
It might help someone: check if your index.php file is in place.
If it's not there, wordpress treats the template as corrupt and it doesn't display the template selection.
This should be simple to troubleshoot. The requirements for the page template to work are straight forward:
The template needs the page title in the top of the file like you've shown (the title needs to be wrapped in a PHP tag, you probably just didn't add it with your example bu I want to make sure you havne't overlooked it):
<?php
/*
Template Name: Custom
*/
?>
The second requirement is that the file is in the root of the theme folder.
With those two requirements in place, it should work. If it isn't working you nave a few possible issues. I list a few off the top of my head:
You might need to re-install WordPress in-case a file was corrupted
during your last update.
It's possible someone has altered the WP-Admin layout using users
roles.
That's all I can thing of at the moment, let me know how it turns out.
I had the same issue. It actually turned out to be a missing style.css file within the template directory in my case.
This happens because the get_post_templates() in class-wp-theme.php first checks for errors. If it finds any then it returns an empty array (no templates are displayed).
A side effect of this is that saving a page would clear the existing template and use the page.php instead.
So in short if the errors() method of your theme returns any errors then no templates dropdown.
hope that helps someone.
Same issued, I found out that in appearance panel in your WordPress dashboard the stylesheet is missing. You shouldn't rename the style.css in your theme folder.
Not sure if this will help anyone, but we solved the problem by disabling our theme and re-enabling it again. We had some other theme folders in the theme directory that we weren't using so we deleted those out as well. good luck, it's a really random problem to solve!
yeah!template dropdown not showing because you have no template So how to solve this::---
1 create template folder in theme
2 create a template in this folder
like:-
<?php /* Template Name: Home */ echo "template"; ?>
and check-in page dropdown will be there.

Resources