Hey guys, I am making a free wordpress plugin. and i need to edit the single.php file for single posts. and i want to know how to do: writecode) beforethecontent) what would the php code be? i have looked everywhere but couldn't find it. http://www.webmastershelpguide.com/
I want to edit the file in wordpress called single.php and add my own php before the <thecontent> tag without changing any other customiseations the user may have, and ideas what the code would be?
Are you trying to edit the content that is being displayed? It is very bad practice for any plugin to make permanent changes to theme files (or any files for that matter). If you are wanting to change/filter the output of the_content() you should look into Wordpress Filters (Plugin API) here: http://codex.wordpress.org/Plugin_API/Filter_Reference Or if you want some code to be called every time before the_post() you should look into Wordpress Actions here: http://codex.wordpress.org/Plugin_API/Action_Reference I believe you should rethink the way you want your plugin to work before continuing development.