https://mydomain.com/scripts/xxxxx.js
Should URL or script file be formatted a certain way?
All I did was paste the javascript code into a text file and changed the extension to .js
I need to add this javascript to the footer/body of the CMP page.
Any thoughts?
]]>is there a possibility (maybe with custom code) or a future plan for auto-blocking e.g. Google Maps and YouTube link other payed solutions like Borlabs do? Or is it possible to do it manually?
Kind regards
Jan
When I add it using the elementor editor, it works. When I preview it using the preview button it works. But after I save it, it stops working. Console shows widget is not defined error, because the <script src=”URL”> was missing on the actual website. Why elementor is stripping out the external src URL after saving? but not during preview?
]]>The script is called by Contact form 7 and Theme My Login
]]>I want to get and change views count from external script.
How it can be done?
https://www.ads-software.com/plugins/post-views-counter/
]]>I want to change views count from external script.
How it can be done?
https://www.ads-software.com/plugins/wp-postviews/
]]>**Update** – could there be something wrong with child theme’s my JS file?
**custom-js.js**
[Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]
]]>I was wondering how to get a connection to the wordpress API from an external script.
In the root directory I have a php script which needs to access WP to read page contents.
To get the content of a page (what the php script is supposed to do) I’ve found the following thread on the forums:
https://www.ads-software.com/support/topic/how-display-content-on-a-custom-page?replies=9
But which files need to be included to use, for example, get_header()?
My script is not a template, at least I think so.
I’ve also found an article for wordpress includes (https://codex.www.ads-software.com/Include_Tags), but it still doesn’t help, as long there is no connection to the WP system.
This might be a nooby question, but my research ended in no solution.
I hope you can help me,
Regards!
[ No bumping please. ]
]]>Did anyone have success in minifying (or caching) external files?
Like example:
https://www.google-analytics.com/analytics.js
Its just one of the files that I see when I check our site via google page insight. I wanna know if there is a work around for this or not.
Thanks!
https://www.ads-software.com/plugins/w3-total-cache/
]]> when I open a new browser tab or navigate to a wordpress page from my PHP script the user is found not logged in.
I am using the following function to log in the user. What am I missing?
function _my_user_login($username,$password) {
$creds = array();
$creds['user_login'] = $username;
$creds['user_password'] = $password;
$creds['remember'] = true;
$user = wp_signon( $creds, false );
wp_set_current_user($user->ID);
wp_set_auth_cookie($user->ID, true);
return $user;
}
Thanks in advance.
]]>