Wordpress -Unable to find the JS code snippet in page - javascript

I have little experience with Wordpress .
I am trying to edit the JS file of my page . I can find those lines in browser console and I am also aware of the fact that a Wordpress page is rendered from Database.
But there are two JS code snippets in my page and they have an icon as follows :
Can someone please help in guiding me where are these JS code snippet actually place so that i can edit them.

I think you are in visual tab of your editor. You need to go into text tab which will show you the coding of your page, that you can find at top right corner in editor.

Related

edit html of wordpress and applying js code-> defer images

I want to edit this site :
https://beansandbriff.com/
which contain of many pages which you can see if you scrolled to the bottom. every page contain many images.
all the images of all pages are loaded when the site is load which cause the site load slowly if I increased the number of images.
I have awesome code that can defer images:
https://varvy.com/pagespeed/defer-images.html
and I know html and JS very well but I don't have experience in WP .
so my ask how I can implement this code to the site ?
I searched a lot and it seems very complicated and sometimes find who say I can't edit html code !!
so if anyone can help I 'll be very grateful
thanks
As the author of the article suggests:
put the script right before the end body tag in your html
To do this, in WordPress Dashboard, go to Appearance >> Editor and edit your Theme Footer file (footer.php). Put the script before the </body>

Edit existing items in a Wordpress theme

I've created a homepage, that simply has a sentence as the content
I've edited the settings so that this the front page of the website.
However, given the theme that I am using, when I go to the home page, this is what I see
I can see the content of my home page at the very bottom, but before that, there is a slider and a couple of blocks (that presumably come with the theme).
I'd like to know either how to remove these default blocks, or edit them myself to include links to other pages.
Also, as you can probably tell, I am very new to Wordpress. Are there any good documentations for beginners that would teach me how to create pages, edit and customize them so that I can have control over the whole page (as a regular website)?
I think you should edit by the php file, so if u don't know PHP start here.
Go to : menu > appereance > editor.
Here u see all the files you need. The file you should edit change with the theme.. so go through the code.
Maybe, it's under header.php
The html code you get above your content is inserted from the page template assigned to your homepage. Thus, if you want to modify it somehow you should go Editor Panel in Appearance Menu, then edit desired template. You can also create your own template with structure you actually want and assign it to that page.
As for a documentation, I think you're going to be good with the official one.
You can edit it by going appearence->editor with php code, be careful when you doing this
if you want to edit a header, you can find header.php in that particular theme
same with footer.php and you customize the design by clicking appearance->customize

I would like to make my menu effects disappear

I am new in web development. I am using the following Wordpress theme: http://test.dominikos.com/
I'd like to disable the top menu effects and make it look like simple white boxes with links.
Obviously there is a JavaScript code that needs to be disabled which I can't find.
Is there a way to locate the file via Firebug?
Thanks in advance
You need to purchase before making changes
Hi, you can't edit the free templates on WordPress. You first need to purchase the theme and then look for the JS which is causing this.
View the source code to view the file
However, You can still view the source code, just go to the link that you're on. And right-click and select View Source Code or try the keyboard shortcut of CTRL + U. You'll see the source code of the website.
Go and buy it and then edit it
But remember that you can't remove or edit the files and layout of the free templates.
Go and buy it, then you'll be able to edit its view! Otherwise, you might need to create your own template by using this scratch of source code. Then you'll be able to create the theme of your own choice.

Colorbox code working outside of Umbraco, but not within

We are new to Umbraco and coding within it, so I thank you in advance for your patience and assistance.
In short, we created a 'test' page utilizing a colorbox pop-up to display a form. It works perfectly in the test page.
When trying to integrate the code into Umbraco, when the "Request Info" button is clicked, the form opens in a full page, and the colorbox does not display.
I would appreciate any assistance that you could provide.
Test link (working):
http://online.saintleo.edu/Colorbox/Untitled-1.html
Example of a page where the "Request Info" button (yellow on right) opens full page, and NOT colorbox:
http://online.saintleo.edu/academics/masters-programs/master-of-accounting-(macc).aspx
I've spent the entire weekend trying to find the solution, hoping to get this resolved ASAP.
Thank you in advance, I appreciate your time and assistance.
This looks like a problem with how you have implemented your script in Umbraco. Just looking through Chrome's browser inspector, I can see that your script is failing to find the colorbox objects which means that something is prevent the library from being available. This is usually because a dependent javascript library has failed.
Looking at your source code, you are loading all your jQuery libraries at the bottom of your page. This is good practice, but you have placed your a second jQuery file reference, your colorbox file references and the custom colorbox code in the head of the page.
There are several things you will need to do:
Remove the jQuery reference from the head of the page;
Move the colorbox file references to the bottom of the page, after all the other javascript file references. You can leave the colorbox CSS file reference in the head.
Move the custom colorbox code to after all the other javascript file references. I usually place this kind of code in a separate file.
Depending on your Umbraco implementation:
If you are using masterpages, use a ContentPlaceholder to allow templates to drop javascript file references into the bottom of the page;
If you are using MVC views, use a footer section to do the same

Sitefinity Javascript Issue

I am using Sitefinity 6.X . The requirement is to create a photo gallery.But Sitefinity does not seem to work with javascript /jquery. I am always getting the error "Function Not defined", even though i included references to all jQueries.
Experts help is much appreciated.
If you are using Sitefinity 6.x go to Widget section drag JavaScript widget from Script and Style Widget and embed your JavaScript/Jquery. There will be a choice to embed your script in html. Please select "Before the closing body" option or "Where the widget is dropped".
Refresh your page again. You will be able to see your photo gallery /Carousel running.
-Rengaseshan
First drag and drop the JavaScript widget
Second either link the file or paste your JavaScript code in the widget
Finally, click more options at the bottom and select the option of inserting your code Before the Closing tag
As a rule of thumb always have JavaScript code/files just before the end of the body tag

Categories