Support » Fixing WordPress » Having Problems Posting a script in a Blog Post

  • Hello All!

    I am trying to get a piece of code to post in one of my blog posts. It doesn’t show up at all when you just add it to a post. I even use the CODE push button.
    Is it even possible for it to work?
    How would I edit it to make it work?

    The code is as follows:

    <script language=”javascript”><!–
    cafepress_keyword_set = “sports”;
    cafepress_default_keyword = “”;
    cafepress_shuffle = “true”; // (“true” or “false”)
    // cafepress_bordercolor=””;
    // cafepress_textcolor=””;
    // cafepress_textcolor2=””;
    // cafepress_bgcolor=””
    // cafepress_bgcolor2=””;
    // cafepress_linkcolor=””;
    cafepress_target_path = “default”;
    cafepress_campaign_id = “”;
    cafepress_optimize_ok = “yes”;
    cafepress_format_type = “all”;
    cafepress_adspace_id = “4132-21530-232-160-160”;
    <script type=”text/javascript” src=””></script>

Viewing 9 replies - 1 through 9 (of 9 total)
  • If you’re using the wysiwyg editor, it will strip your code out. Disable it (in your user page near the bottom), and try again.

    Maybe i’m a little slow, but 🙂
    I guess I use what your referring to as the WYSIWYG (post screen).. However, I have never found a way of “Turning” that off, and what is left when that is turned off?
    I also haven’t upgraded yet to the newest (dec?) wordpress

    In wp-admin/users, your profile, near the bottom, at the left:

    Personal Options

    Use the visual rich editor when writing

    uncheck the box.

    What’s left is just like what there is in 1.5.2 – a text entry field.

    My version of WordPress is:

    Which I assume a good course is to upgrade, but then if it reverts back to what i’m using now technically, it might not post then??!?

    Anyone know how this would work? 🙂

    Hmm. Well, if your version is that old, you should upgrade at least to 1.5.2. And since your version is that old, you don’t HAVE the wysiwyg (which is a 2.0+ thing). So I’m not sure why your code isn’t working.

    Try using a plain text editor to insert the js. And you might need to surround the actual script in CDATA tags. In fact, try this:

    <script language="javascript">
    cafepress_keyword_set = "sports";
    cafepress_default_keyword = "";
    cafepress_shuffle = "true"; // ("true" or "false")
    // cafepress_bordercolor="";
    // cafepress_textcolor="";
    // cafepress_textcolor2="";
    // cafepress_bgcolor=""
    // cafepress_bgcolor2="";
    // cafepress_linkcolor="";
    cafepress_target_path = "default";
    cafepress_campaign_id = "";
    cafepress_optimize_ok = "yes";
    cafepress_format_type = "all";
    cafepress_adspace_id = "4132-21530-232-160-160";
    <script type="text/javascript" src=""></script>

    This didn’t work either.
    I do thank you for your help 🙂

    It’s been driving a few of us nuts that have wordpress, trying to get these to work.

    Someone said a retooled Adsense plugin would make it work… Still not sure..

    But would still be nice to be able to cut and paste them into posts 🙂

    I did try the upgrade to 2.0,, it was scary, I have to admit I didn’t like the new interface, and things felt cold. Then, I messed up my website trying to revert back, luckily had a back up copy.

    Hi Jolene,

    Stick with 2.0!:-) Seriously, I thought the same thing at first but now I love it. It’s more intuitive than what you think.

    Have you tried blockquoting the code?

    Rashunda, Yes, have used the block quote function, as well as the above suggested CDATA tags.

    Many of us tried to use the above scripts in the actual posts, but end up with nothing appearing at all.

    Hmm, as for 2.0, I’m sure i’ll come around sometime on it… but for now, hmm, not ready to make that leap until I know it keeps working… LOL

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Having Problems Posting a script in a Blog Post’ is closed to new replies.