How to create a theme function for custom HTML markup and then call it in my node template? Ive created an asses for my site in the content type tpl file. Its mainly HTML but also some simple PHP. What are the steps to move this to a theme function?
You should be able to use the template_preprocess_node function to move your logic from your tpl files into the theme function. In order to use the function, replace template with the name of your theme.

function mytheme_preprocess_node(&amp;variables){
  if($variables['node']-&gt;type == 'my_content_type'){
    //change what you want to the node here.
  }
}


You could do the logic you need to inside this functionn, save the output to a variable in $variable (it's a reference var, so it dosn't need to be returned) and then just print out that variable in your tpl.php file.