php - The proper way to use your own class in wordpress -
i have class generate html, php code composed of 468 lines, tried put in index.php of wordpress theme , render html. problem is, html contained links (e.g., http://localhost/wp-explore/wp_commentmeta/list) calls method of class, cannot locate class , method.
for example:
class myclass { function __construct(argument) { # code... } public function render_html() { /*code rendering html*/ } public function function_call () { /*code executing function*/ } } at first visit of website, localhost/mysite calling method render_html() successful, render html on browser, html contained link call function_call ()
what proper way in wordpress?
Comments
Post a Comment