magdalenagirl
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageand thanks for the info about the template option. i didn’t know about that. i might use that sometime.. thanks!
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageomg it worked (duh), thanks so much!!
i installed phpexec and then added:
<?php $numberofimages = 10; echo '<img src="'.get_bloginfo('template_url').'/top'.rand(1,$numberofimages).'.gif" />'; ?>
inside the post and it worked! thanks again!
^_^
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageohhh…sorry i didn’t understand what you were saying.
you’re adding the the code directly into the page file.
i’m adding it inside an actual post, on the wordpress admin, under add new page.
i want it only on one page, not all pages…Forum: Fixing WordPress
In reply to: adding javascript into an individual pagenop, nothing.. didn’t work
i appreciate your help.can i see where you’re testing it?
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageabove and below what?
Forum: Fixing WordPress
In reply to: adding javascript into an individual pagethis is what it shows me when i go to view the page:
‘; ?>
Forum: Fixing WordPress
In reply to: adding javascript into an individual pagewhere do i put that code?
Forum: Fixing WordPress
In reply to: adding javascript into an individual pagehow do i share the url?
I’m going to try ashfame’s suggestion…although I’m not sure I understand the php code completely and where to put it. the site doesn’t tell you.
Forum: Fixing WordPress
In reply to: adding javascript into an individual pagehmm… when i refresh the page, it looks like it’s about to show the image but it doesn’t. i don’t know if that makes sense. maybe there’s some other script that’s coming into conflict with it…
i typed something inside the post with this:
<script type="text/javascript" src="<?php get_bloginfo('template_url'); ?>/randomtop.js"> </script> <script type="text/javascript" language="JavaScript"><!-- printImage(); //--></script>
I could see the text but not the image
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageyea, i did try that…
nothing happened ??
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageit is closed
FirstPart = '<img src="top'; LastPart = '.gif">';
that’s the way it’s scripted
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageyes!
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageyou’re saying to add
get_bloginfo('template_url')
to the script?This is what I did
<!-- // // Type the number of images you are rotating. NumberOfImagesToRotate = 2; // Specify the first and last part of the image tag. FirstPart = '<img src="get_bloginfo('template_url')/top'; <<<<<<<<<HERE LastPart = '.gif">'; function printImage() { var r = Math.ceil(Math.random() * NumberOfImagesToRotate); document.write(FirstPart + r + LastPart); } //-->
If so, I tried it and it didn’t work
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageanyone has any idea???
I really need this…
Forum: Fixing WordPress
In reply to: adding javascript into an individual pageHey Shane, thanks for your reply.
I did read through all of that, and I’m doing exactly what it says or maybe not..This is my .js file
<!-- // // Type the number of images you are rotating. NumberOfImagesToRotate = 2; // Specify the first and last part of the image tag. FirstPart = '<img src="top'; LastPart = '.gif">'; function printImage() { var r = Math.ceil(Math.random() * NumberOfImagesToRotate); document.write(FirstPart + r + LastPart); } //-->
which I saved in my theme folder as randomtop.js
and this is what I’m putting in the post:
<script type="text/javascript" src="https://localhost/wordpress/wp-content/themes/themeone/randomtop.js"> </script> <script type="text/javascript" language="JavaScript"><!-- printImage(); //--></script>
I’m even using the raw html plugin.
Also, I have wordpress installed offline for testing themes.
I’m not sure what I’m doing wrong…