0
votes
1answer
45 views

What is the right way to include a wp-admin file in your theme?

I'm trying to use wp_delete_user() in my theme, to allow a user to delete their account from the front-end. Turns out that the wp_delete_user() is not defined unless /wp-admin/includes/user.php has ...
0
votes
1answer
135 views

Should I use include or load_template for including shortcodes, plugins and so on?

I am wondering what is the right way to include additional php files for theme options, shortcodes, plugins and so on. Both load_template and include will work, but what has better semantic value? ...
1
vote
3answers
4k views

Include a external PHP file into a Wordpress Custom Template

Is this even possible? I mean, im trying to add a blog into my site.. I already have the header,footer and sidebar layout in my site. can i use those in my custom wordpress template? <?php /* ...
0
votes
1answer
97 views

Want to include ad code after related post

I want to include ads HTML code after related post plugin. My site my single.php code below: <?php if ( ...
6
votes
1answer
888 views

Should we use get_template_part() in functions files instead of include_once?

I'm using the theme-check plugin to check my theme for errors and recommendations, I'm using get_template_part() in theme files like header.php and index.php but in functions.php I'm using ...
0
votes
2answers
988 views

Is it possible to include an HTML flat-file website inside a WordPress theme?

Is it possible to include an entire flat-file HTML site (.html, folders/ and CSS) inside WordPress? Essentially, I want to host an HTML site, but have access to WP functions and plugins. Not to ...