Autor | Zpráva | ||
---|---|---|---|
KoZi_piss Profil |
#1 · Zasláno: 7. 2. 2020, 21:16:04
Ahoj na webu legabeton.cz na wordprressu nejnovějším. WordPress 5.3.2 s vlastní upravenou šablonou mam chybu.
Projevuje se v galerii foto : legabeton.cz/realizace/hala-na-obili-kojice - Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /data/web/virtuals/120322/virtual/www/wp-content/themes/legabeton_v12/single-realizace.php on line 13 Někdě na řádku 13 mam chybu, ale nevím co je tam špatně, dokáže mi někdo z Vás poradit ? řádek 13 je tento : <?php// if($podnadpis) {echo "<h2 class='podnadpis'>".$podnadpis."</h2>";} ?>
<?php get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="silver-cont"> <div class="row text-center"> <div class="columns large-12 medium-12 small-12 text-center"> <?php $realdesc = get_field( "realdesc" );?> <h1 class='hlnadpis'> <?php the_title(); ?> </h1> <?php// if($podnadpis) {echo "<h2 class='podnadpis'>".$podnadpis."</h2>";} ?> <h2 class='podnadpis'><? if( $realdesc ) {echo $realdesc;} ?></h2> </div> </div> <div class="row text-center rohy bottom"> <div class="columns large-4 medium-4 small-4"> </div> <div class="columns large-4 medium-4 small-4"> <img src="<?php echo get_template_directory_uri (); ?>/library/images/wcenter.png" /> </div> <div class="columns large-4 medium-4 small-4"> </div> </div> </div> <div class="white-cont"> <?php // $hlnadpis2 = get_field( "nadpis_v_tele" ); ?> <?php // mainHeader($hlnadpis2,"h2"); ?> <div id="content"> <div id="inner-content" class="row clearfix"> <div id="main" class="large-12 medium-12 small-12 columns" role="main"> <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/WebPage"> <header class="article-header"> </header> <!-- end article header --> <section class="entry-content clearfix single-ref" itemprop="articleBody"> <?php // the_post_thumbnail('large',array('class' => 'alignright')); ?> <?php ob_start(); the_content('Read the full post',true); $postOutput = preg_replace('/<img[^>]+./','', ob_get_contents()); ob_end_clean(); echo $postOutput ?> <?php $attachments = get_posts( array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID ) ); if ( $attachments ) { foreach ( $attachments as $attachment ) { ?> <?php $image_attributes = wp_get_attachment_image_src( $attachment->ID,"large" ); ?> <?php if ( $image_attributes ) : ?> <?php endif; ?> <div class="large-3 medium-6 small-12 columns"> <div class="grid-item" > <a href="<?php echo $image_attributes[0];?>" data-lightbox="<?php echo $post->ID; ?>"> <?php echo wp_get_attachment_image( $attachment->ID, 'thumbnail' ); ?> </a> </div> </div> <!-- <a href="<?php echo $image_attributes[0]; ?>" class="img-wrap">--> <?php /* if ( has_post_thumbnail() ) { the_post_thumbnail("medium"); } */?> <?php // echo apply_filters( 'the_title', $attachment->post_title ); ?> <?php } } ?> <?php wp_link_pages(); ?> </section> <!-- end article section --> <footer class="article-footer"> </footer> <!-- end article footer --> <?php // comments_template(); ?> </article> <!-- end article --> </div> <!-- end #main --> <?php // get_sidebar(); ?> </div> <!-- end #inner-content --> </div> <!-- end #content --> </div> <?php endwhile; else : ?> <?php get_template_part( 'partials/content', 'missing' ); ?> <?php endif; ?> <?php get_footer(); ?> |
||
lionel messi Profil |
#2 · Zasláno: 7. 2. 2020, 21:52:52
KoZi_piss:
Čo sa stane, ak sekvenciu <?php a komentár // oddelíš medzerou?
<?php // if($podnadpis) |
||
KoZi_piss Profil |
#3 · Zasláno: 7. 2. 2020, 22:01:19
lionel messi:
Nejspíš to funguje :D Děkuju ! :) |
||
Časová prodleva: 4 roky
|
0