Support » Fixing WordPress » Create a Page from an internal .php

  • I’ve search and can’t seem to find an answer to this. I’ve installed the Lazy Gallery plugin and it works fine. What I want to do is have a Page that displays it vs just using a link on the side bar. Here’s my site: I already created the page “Artwork” with incorrect PHP code (far from my forte).
    Here’s the Page template code

    Template Name: Lazy Gallery

    <?php get_header(); ?>

    <div id=”content” class=”widecolumn”>
    <div class=”post”>
    <div class=”entrytext”>
    <div class=”styled”>

    <?php include (); ?>


    <?php get_footer(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just go to your WP Console and click Write, Page and title the page whatever you want (e.g., “Artwork”). Then leave the rest blank. You should see a dropdown box to choose the Lazy Gallery Template. Select it and save the page. Then create a link to it in your sidebar. That should do it.

    That’s what I’ve done but I get
    Warning: main(/lazy-gallery.php): failed to open stream: No such file or directory in /homepages/43/d114412143/htdocs/wordpress/wp-content/
    themes/mx4_theme/gallery.php on line 14

    Probably due to my incorrect PHP usage (see first post)

    Well, until this is figured out, I just created a new link category and sublinks.

    Why is your include blank? (Not familiar with how the plugin works, but I don’t see why you need to include the template file or whatever.)

    @jonimueller: if you didn’t know, you don’t need to leave it blank if you don’t want to. For example, I usually stick The Loop into my custom page templates so that I can more easily edit any content.

    Viper –
    It was
    <?php include (lazy-gallery.php);>

    which is what gave me the error.
    Let me clarify what the plugin in does (or at least try): essentially all it does it create a “gallery” page lazy-gallery.php in the wordpress directory, that pulls pictures off a folder.

    this is off the top of my head. but isn’t the gallery page actually lazy-index.php?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Create a Page from an internal .php’ is closed to new replies.