How to out a input button in themename/index.php

I’m new for WP.

there are some problem troubled me…

  1. When I add a group of input buttom
    <form action=“<?php STYLESHEETPATH . ‘index.php’; ?>” method=“post” target=“_self”><input type=“submit” value=“name” onclick=“sub(‘name’)”>
    and set it point to index.php(theme path), it failed. How to write the right path?

  2. It not support jquery ‘append’ Function.

  3. the admin panel-appearance-edit just support edit the pages under theme’s parent folder, I can not edit the files under theme’s child folders?
    Like edit: wordpress\wp-content\ hemes\ hemename\css

I’m glad to talk with anyone who use WordPress. Thanks again.

Thanks seriocomic, you are good at WP.

  1. I modify a theme, I notice all the theme use STYLESHEETPATH in its code for the them path. So I follow this one.
  2. I tried to add a jquery menu in my wp theme page, but failed.
    I noticed other people who also has had this question and Response in the following.
    Then I tried another jquery plungin which it use ‘append’ Function, it also failed, So I guess WP not support jquery ‘append’ Function.
  3. I test WP under windows, I noticed all my files are less readable, I can not set them writeable, maybe this is a reason that I can not edit the files in child folder.


I’m sure someone smarter than me will come along and answer these better, but I’ll give it a go…

For what reason would you set the action value of the form to be the index.php file in the stylesheet path(Maybe you meant TEMPLATEPATH)? Most WP forms have the action set to “SELF”, or a defined filepath. I’ll assume you have a PHP file ready to handle the form inputs? Is the index.php file configured to do that?

jQuery requires that you have an id associated with either the form or the input (the page element you want to append to), so you’ll need to add id=“someId” to either the form or the input field. Then the ‘append’ function can be attached to that element.

Have you checked that those files are visible in on that screen? If so, then you’ll need to check the CHMOD values to ensure that they are writeable (755 or 777).


WordPress has nothing to do with supporting the function or not. JavaScript is a browser-side language - not a server-side one (which is what WordPress is coded in - PHP).

You’ll need to either post a link to your code or page for us to be able to assist.

While WordPress can be installed on a windows environment, its native environment is *nix (Linux/Unix etc). The file-systems are different. Regardless of what system you’re using/testing, you’ll need to adjust the folder/file permissions to be able to edit them.

I have read the article and tried TEMPLATEPATH, but it point to WP default theme. And now I just modify a custom theme.

I tried to use
<?php include( STYLESHEETPATH . ‘/index2.php’); ?> in my mytheme/index.php
It worked, and use
<?php include( TEMPLATEPATH . ‘/index2.php’); ?>, it was wrong.

So I think the input button may be also use STYLESHEETPATH ,
<form action=“<?php STYLESHEETPATH . ‘index.php’; ?>” method=“post” target=“_self”><input type=“submit” value=“name” onclick=“sub(‘name’)”>
But it can not post the value with a right path…