Currently, CSS and JS added in head section
But I want to add in the footer. In which I need to put the css and js?
script layout xml tag will only work inside
head I think you'll need to create a block as a child of
before.body.end and load your CSS/JS files manually there.
Alternatively you could do that directly in layout XML like this:
Although that wouldn't work well for local assets as you'd have to hard code the pub/media URL which wouldn't work if you have versioning enabled.