Return to Support

How to insert Javascript code for a single page

Home Forums Graphene WordPress theme Support How to insert Javascript code for a single page

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9304
    garyc
    Member

    Hi guys,

    I’d like to show my eBay listings on my ‘For Sale’ page of http://www.hackneytools.com

    instead of the manually coded list I have now.

    I’ve chosen a plugin called ‘Auction Nudge’, which seems the most basic and

    functional plugin out there to do this. The eBay listing can be called into the page

    with a shortcode, but I’m at a loss as to how (and where) I insert the generated

    Javascript code that is given when I prompt the plugin with my eBay user ID.

    I only need the list on my for sale page: http://www.hackneytools.com/forsale

    How to I ‘get into’ just that page in my Graphene Child Theme to drop the

    code into the <body>….</body> area??

    Sorry, I am such a klutz at all this.

    best

    Gary

    #43304

    Does it create an issue if it’s inserted on every page?

    #43305
    garyc
    Member

    Hi Kenneth

    I wouldn’t have thought so? I guess it’s just there and it’s called if it’s needed by any shortcode on the page itself? Not sure,

    I don’t even know what Javascript is, to be fair.

    :-/

    #43306
    Quote:
    I’m at a loss as to how (and where) I insert the generated

    Javascript code that is given when I prompt the plugin with my eBay user ID

    If it doesn’t matter whether it’s on every page, then you can go to:

    Graphene Options >> Advanced Options >> Custom <head> Tags

    and insert it there.

    #43307
    garyc
    Member

    Hi Kenneth

    Pasting the (long) code snippet into that box looks odd as the text runs out of the box and crashes

    onto the r/h box about Documentation Wiki, etc. If I click ‘save’, it says ‘Options Saved’, but then going to

    my page and putting in the shortcode:

    [auction-nudge tool=”listings”]

    doesn’t make the listing appear.

    Not sure whether I’m doing this right, maybe I should ask the dev of the plugin?

    g

    #43308

    What page should we be seeing this on?

    #43309
    garyc
    Member

    Hi Kenneth,

    Sorry, I’ve wiped it for now, because I got frustrated that it wasn’t working and went

    back to the normal page. I was trying it out at

    http://www.hackneytools.com/forsale

    I think I might avoid Javascript, it never works for me and always causes problems.

    Thank you for having a look.

    Gary

    #43310
    Quote:
    Javascript…it never works for me and always causes problems

    I believe that’s the JavaScript coder’s motto, lol.

    Check the documentation on the plugin. If the JavaScript is supposed to go into the <head> element, the above should work. If it’s supposed to go at the end of the <body> element, we’d need to try something different.

    #43311
    garyc
    Member

    hahahaha!

    Actually, it now works! I was being a bit of an idiot and hadn’t scrolled down when I was

    looking at the admin area for that precise page. The plugin load a clear admin area of its own,

    you just tick a few things, drop the code into another area and it just works.

    http://www.hackneytools.com/forsale

    I’m quite pleased with it, although it’s a very basic thing I’ve seen on a million websites, it will

    cut out a lot of work for me. I can just list tools on eBay, but people will still get some tools to

    look at if they come to my site first. All good.

    Thanks again.

    g

    #43312

    Nicely done! I may have to try that one in the future.

    #43313
    garyc
    Member

    Cheers

    Have just posted another question. All my nav bars on the mobile version are

    different to main ‘desktop’ site now? Argh. How do I change these?

    #43314
    garyc
    Member

    Got it. ‘Manage Locations’. Thanks

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.