0

Is it possible to call a template file, say for example mycustomtemplate.php inside the default Wordpress WYSIWYG editor?

I had this content.

My team (This is my content inside the WYSIWYG) then I would like to call a template file. When your inside a template file you would write

    <?php get_template_part('includes/page-team-list'); ?> 

So how could I do this on the WYSIWYG editor? Or I have to use some PHP plugins for these php codes to work on WYSIWYG?

0

PHP (unlike HTML) is not meant to be used as content markup language. It is server–side language with too much access. It is very challenging to safely and securely treat PHP as part of content.

For basic example — what if one of your authors writes PHP code in a post which amounts to "make me site's administrator"?

While WP plugins implementing this do exist, this is almost never good idea, especially at multi–author site.

The typical way of handling more elaborate content in WordPress is via custom fields / meta boxes (/frameworks for both), although it usually falls farther away from WYSIWYG.

  • I have resolve my problem, I made a separate template then use custom fields to call the template file page-team-list. – mejiwara Jul 24 '14 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.