• Hello,

    I have tried calling the staff list using “<?php new stafflist(); ?>” in a page but have had no luck. I am putting it in the “text” view of the page not the “Visual” view. I have tried wrapping it with “[ ]” but that doesn’t work either. Am I missing a step?

    Thanks

    http://ww.wp.xz.cn/plugins/stafflist/

Viewing 1 replies (of 1 total)
  • Plugin Author ERA404

    (@era404)

    You can put this into a template using the above code, not into the wordpress backend, which will render all PHP code as html.

    Open any template (example: front-page.php) in your favorite text editor, and insert the code (anywhere outside of the wordpress loop).

    A little bit more involved, you could create a new template for your staff directory page.
    a) Duplicate ‘page-templates/front-page.php’ and rename it ‘page-templates/directory.php’
    b) Change the top line comment to read:
    * Template Name: StaffList
    c) Insert the stafflist code just below the content div and above the wordpress loop, like this:

    <div id="primary" class="site-content">
    		<div id="content" role="main">
    
                    <?php new stafflist(); ?>
    
    			<?php while ( have_posts() ) : the_post(); ?>

    d) Now, with the wordpress backend, make a new page and use the custom StaffList directory template instead of the default for each page you would like StaffList to appear.

    Quick References
    Editing Files « WordPress Codex

Viewing 1 replies (of 1 total)

The topic ‘Calling the plugin in a page’ is closed to new replies.