Pages are forgettting their Template Names
-
Hej,
I recently coded my ownn theme for this site: grupo-berlin.de. Nearly every Site is a Custom Template with
<?php /** Template Name: Various Names */ ?>
at their top.
Every template is named: radscheit-XXX.php
When I setup pages with one of my templates it works fine. When I visit the same page a few hours later the page forgot its template name and nothing but header and footer is displayed. I’m using Advanced Custom Fields and WPML.All of my templates are very similiar:
<?php /** Template Name: Leistungen */ ?> <?php get_header(); ?> <div class="container" id="contentbereich"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (get_field('main-headline') && get_field('2nd-headline') && get_field('copy-text') && get_field('grafik')): ?> <div class="row"> <div class="col-md-10 col-md-offset-1"> <h1 class="uberschrift-grey"><?php the_field('main-headline'); ?></h1> </div> </div> <div class="row"> <div class="col-md-8 col-md-offset-2"> <h3 class="halbfett"> <?php the_field('2nd-headline'); ?> </h3> <div class="row"> <div class="col-md-4"> <?php the_field('copy-text'); ?> </div> <div class="col-md-8"> <img src="<?php the_field('grafik'); ?>" class="img img-responsive"/> </div> </div> </div> </div> <?php else: ?> <p class="rahmenoben"><?php _e('Es sind keine Posts hinterlegt.'); ?></p> <?php endif; ?> <?php endwhile; else: ?> <p class="rahmenoben"><?php _e('Es sind keine Posts hinterlegt.'); ?></p> <?php endif; ?> <?php get_footer(); ?>
Does anyone have an idea?
Thanks in advance
- The topic ‘Pages are forgettting their Template Names’ is closed to new replies.