• Croata

    (@croata)


    Hello everyone I want to make the call of an index that is in a folder inside the wordpress directory!

    the structure is

    wp-admin
    wp-content
    wp-includes
    Central – This is the folder where my index file!

    I call this file in my custom page

    Tried

    <?php / * Template Name: * Central /?>
    
    <?php get_header ();?>
    
    / / here you can not find and do not know how!
    
    <?php include (.../ core / index.php); ?>
    
    <?php get_footer ();?>

    How do I make this call? Since already very Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Croata

    (@croata)

    excuse the formatting cut the beginning of the php
    over all they have!

    <?php

    [please mark your code using the ‘code’ button –
    either click the ‘code’ button once before writing/pasting your code, then again once after;
    or highlight the code, and then click the ‘code’ button once]

    Michael

    (@alchymyth)

    try:

    <?php /* Template Name: Central */?>

    see example from http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    <?php
    /*
    Template Name: Snarfer
    */
    ?>

    this is the same as:

    <?php /* Template Name: Snarfer */ ?>

    Thread Starter Croata

    (@croata)

    excuse me my friend, ended up formatting the wrong!
    the pages are appearing so, what I’d do is call!

    <?php
    /*
    Template Name: central
    */
    ?>
    
    <?php get_header ();?>
    
    / / here you can not find and do not know how!
    
    <?php include (.../central/index.php); ?>
    
    <?php get_footer ();?>

    the problem is this line!
    <?php include (.../central/index.php); ?>
    Error

    Warning: include(..\central\index.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\wp-content\themes\twentyten\pagcentral.php on line 8
    
    Warning: include() [function.include]: Failed opening '..\central\index.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\wordpress\wp-content\themes\twentyten\pagcentral.php on line 8

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom Page Template’ is closed to new replies.