• I am design wordpress custom template. I am design many custom pages. In that page if i am adding <?php get_header(); ?> <?php get_footer(); ?> this code then first visit of content page they will be display if i am refreshing the page content didn’t display only images will be displayed, if i am removed <?php get_header(); ?> <?php get_footer(); ?> this code the issued was solved but plugin is not working without code. If any solution please help me

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

    (@alchymyth)

    please post the full codes of header.php, your template file, and footer.php;

    please use the pastebin http://codex.wordpress.org/Forum_Welcome#Posting_Code

    Thread Starter gosavia

    (@gosavia)

    header.php

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     */
    ?>
    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
        <head>
            <meta charset="<?php bloginfo('charset'); ?>" />
            <title>
                <?php
                /*
                 * Print the <title> tag based on what is being viewed.
                 */
                wp_title('|', true, 'right');
                ?>
            </title>
            <link rel="profile" href="http://gmpg.org/xfn/11" />
            <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
            <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_uri(); ?>" />
            <script type="text/javascript" src="js/animatescroll.js"></script>
            <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
            <!--[if gte IE 9]>
                    <script type="text/javascript">
                            Cufon.set('engine', 'canvas');
                    </script>
            <![endif]-->
            <?php wp_head(); ?>
        </head>
        <body>
    
                <!--Start Container-->
    
    page.php
    
    <?php
    /**
     * The template for displaying all pages
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     */
    ?>
    <style>
    @font-face
    {
    font-family:Neo Sans Intel;
    src: url(http://xenium.xeniumdigital.in/font/NeoSansIntel.ttf);
    }
    BODY
    {
    font-family:Neo Sans Intel;
    }
    </style>
    <?php get_header(); ?>
    <!--Start Content Wrapper-->
    <div id="page"><div class="pagetitle"><?php the_title(); ?></div>
     <div id="search2"><?php get_search_form(); ?> </div>
    <div class="logopage"><a href="http://xenium.xeniumdigital.in/"><img src="<?php bloginfo('template_url'); ?>/images/back/logo_for-pages.png"  width="100%" /></a></div>
    <div id="menupanel"><?php wp_nav_menu( array( 'theme_location' => 'sidemenu' ) ); ?></div>
    <div id="menupanel2"><?php wp_nav_menu( array( 'theme_location' => '1024menu' ) ); ?></div>
    <div class="aboutpage1">
    <center><div class="subcontent1">
        <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
        <!--Start Content-->
          <!--Start Post-->
            <h1 class="post_title">
              <?php the_title(); ?>
            </h1>
    
              <?php the_content(); ?>
    		      <!--End Content-->
        <?php endwhile;?>
    
      <!--Start Sidebar-->
    
      <!--End Sidebar-->
    </div>
    <!--End Content Wrapper-->
    <div class="clear"></div>
    </div>
    <!--End Container-->
    <div id="social5">
    
    <ul>
    <li><a href="https://www.facebook.com/xeniumdigital"><img src="<?php bloginfo('template_url'); ?>/images/icon_FB.png" width="100%"></a></li>
    <li><a href="http://www.youtube.com/user/xeniuminteract"><img src="<?php bloginfo('template_url'); ?>/images/icon_YT.png" width="100%" ></a></li>
    <li><a href="https://twitter.com/XeniumDigital"><img src="<?php bloginfo('template_url'); ?>/images/icon_T.png" width="100%"></a></li>
    <li><a href="https://plus.google.com/+XeniumDigitalPrivateLtdMumbai"><img src="<?php bloginfo('template_url'); ?>/images/icon_G+.png" width="100%" ></a></li>
    <li><a href="http://www.linkedin.com/company/xenium-digital-pvt-ltd"><img src="<?php bloginfo('template_url'); ?>/images/icon_LI.png" width="100%"></a></li>
    </ul>
    </div>
    </div>
    <!--End Content Bg-->
    <?php get_footer(); ?>
    
    footer.php
    <?php wp_footer(); ?>
    </body></html>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter gosavia

    (@gosavia)

    right now i haved solved the problem with this <?php get_header(); ?> code
    but if i remove <?php the_title(); ?> this code then same problem happen (first visit of content page they will be display if i am refreshing the page content didn’t display only images will be displayed,)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Template’ is closed to new replies.