• Resolved k4lic0

    (@k4lic0)


    Hello everyone. I was wondering how to put a little java script code before the first post on my wordpress blog..?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Edit your theme, put the code in there.

    Thread Starter k4lic0

    (@k4lic0)

    Well, obviously. But where do I put the code to have it sit before the first post?

    I tried putting it in the first post and making it sticky, but the Java aspects didn’t show up within the post. Anyone have a halfway decent answer?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    I don’t understand the question. You’d put it in your theme wherever the heck you’d want it to actually be.

    I mean, where do you want to put it? In the header? In the footer? In the index template? You’re asking the question “where do I put it” but not telling us where you actually want to put it, you know? ??

    If you want it before the first post then you edit the theme and put it above the posts Loop. So either there’s your answer or I’m somehow misunderstanding your question.

    Thread Starter k4lic0

    (@k4lic0)

    Ahh, it worked that time. Thanks!

    One last question, the bottom of my java applet is touching the top of the most recent blog post. How do I add a gap in between the two page objects?

    Thread Starter k4lic0

    (@k4lic0)

    Anybody know?

    Java? is that a plugin??

    Thread Starter k4lic0

    (@k4lic0)

    No, it is a programming language. I’ve got the java that I wanted working. But, it’s butted up against the first post.. and I want a gap in between the two items (like the gap between the items in the sidebar.)

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    1. Java is not Javascript. These are two different things entirely, so it’s confusing when you mix the two up.

    2. Wrap the code in a DIV with a class, and then use CSS to give that DIV some extra bottom margin.

    <div class="myscript">
    .. your script ..
    </div>

    In the CSS file:

    div.myscript {
    margin-bottom: 5px;
    }

    Why wrapping another div (tag) around a script tag? The script tag itself is also stylable using CSS. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adding java before first post?’ is closed to new replies.