Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hello,
I have been trying to add a Javascript output into vantage theme – tried it both as a post and page. It takes the default sticky menu and default footer, and displays the javascript output below the page.
I want the footer below the javascript output with the social media tag widget (to share etc.)
Could you please look into it as soon as possible.
Thanks,
Dhanya.
http://www.nfactorialanalytics.com/?p=155 This is the link. Please ignore previous.
Hi Dhanya
Thanks for running Vantage.
Please let me what Javascript you’re trying to add and what it is for. I’ll try advise the best method forward once I know that. I’m sure we’ll be able to get this resolved.
Thank you Andrew for the quick response.
I am trying to add an svg file (that outputs a network diagram) using javascript. I can’t see a source where I could edit the div tag and enable the positioning of the SVG file.
Hope you could help.
Andrew – – this is the link and whats happening: http://www.nfactorialanalytics.com/?p=155
Andrew – – this is the link and whats happening: http://www.nfactorialanalytics.com/?p=155
and it uses the d3 JavaScript library.
Ok so it looks like you’ve made progress then. Ideally we’d use a child theme to handle this. Can you paste in the actual script link and actioning JS that’s required?
Below the comment field below we indicate how to paste in code.
I’ll be with you ASAP tomorrow.
Is it currently outputting as you require? Below the footer?
Hi Andrew,
Thank you for the response again. :)
Here is the code. I am not sure how to do a child theme – pretty new to this myself. I have been using the CSS & Javascript Toolbox to add a code block, and then import that into the post.
Hi Andrew,
Thank you for the response again. :)
Here is the code. I am not sure how to do a child theme – pretty new to this myself. I have been using the CSS & Javascript Toolbox to add a code block, and then import that into the post.
For sure. I’ll take a look asap tomorrow. Can you perhaps link us to the documentation you’re looking at for this?
Ahmmm. No documentation that I am referring to. I am just going by the tutorials on WordPress. :)
The network map that you see below the footer, I need that to be within the white content space – below social. But don’t know where I could edit the code to move the svg file. I tried in Inspect Element – and it let me get the output. But then, that way, the change won’t reflect backend, right?
Appreciate anything you could help to sort this out.
Thanks much.
Have a good Sunday!
This section here should be inserted under Appearance > Custom CSS:
Here is a child theme you can try use as a starting point: https://siteorigin.com/wp-content/uploads/2014/09/vantage-child-network-diag-js.zip. You can install via Appearance > Themes > Add New > Upload Theme. I’ve had a go at inserting the JS into content-single.php, have a look at that file via Appearance > Editor. Remember to insert the CSS under Appearance > Custom CSS.
Give it a test and see how it goes.
Andrew, i tried the child theme. But the entire look and feel created for the rest of the site gets drastically altered. I have done exactly what you have asked – – but have not got a result. Help me answer some simple questions:
1. Where can i see the code to a page that I create? I am not able to edit the code.
2. Can i add a child theme to just one page i create – without affecting rest of the premium theme?
Thanks.
Adding a child theme to any site will cause the Customzier and menu assignments to be reset. If the child theme works you’ll need to redo all of your Appearance > Customizer settings and re-assign your menu.
If you un-zip the child theme I sent through you can see what I’ve attempted to do there. We are quite far into the custom development space. I can try point you in the right direction, even make an attempt at resolving your request, as I did with the child theme, but this isn’t really part of our normal support offering. At some point it might useful for a developer to jump in and help you roll this out quickly.
1. Your pages are controlled by the theme. It’s not possible to edit the entire page in code view. The theme uses PHP to build the code around the content as required.
2. Yes, a child theme can have a custom page template that targets the ID of one page only. See: http://codex.wordpress.org/Page_Templates and page-{id}.php.