رفتن به مطلب

عدم نمایش محتوای برگه


پست های پیشنهاد شده

سلام

قالب سایت جدیدا محتوای برگه رو نشون نمیده و فقط عنوانش رو نمایش میده

کسی میدونه مشکل از کجاست؟

3.7.1 رو هم گرفتم اما مشکل حل نشد

لینک به ارسال

فایل page.php را چک کنید یا اینجا قرار بدید

این فایل page.php خدمت شما

<?php get_header();?>

<div class="main">



<div class="sidebar-a">


<br />

<div class="single">

<div class="titrs">
<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
</div>
<br>
<p style="text-align:justify">
<?php the_content(); ?>
</p>

<br>

<p style=" font-size:11px; color:#888;">
تاریخ انتشار : <?php the_time('j M, Y'); ?> |




</p>
<br>

<div class="tags">
ابرچسب : <?php the_tags(' ', ', ', ''); ?>
</div>

</div>

<br>


<div class="single">
<?php comments_template(); ?>
</div>



</div><!----End-sidebar-a---->


<div class="sidebar-b">


<div class="tabs">
<?php include(TEMPLATEPATH .'/tabs.php'); ?>
</div><!----End-tabs---->


<?php include(TEMPLATEPATH .'/ads.php'); ?>


</div><!----End-sidebar-b---->



<div style="clear:both"></div>
</div><!----End-menu---->


<?php include(TEMPLATEPATH .'/footer.php'); ?>


</body>
</html>

لینک به ارسال

این کد را جایگزین کنید ببینید مشکل حل میشه


<?php get_header();?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="main">
<div class="sidebar-a"> <br />
<div class="single">
<div class="titrs">
<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a></h1>
</div>
<br>
<p style="text-align:justify">
<?php the_content(); ?>
</p>
<br>
<p style=" font-size:11px; color:#888;"> تاریخ انتشار :
<?php the_time('j M, Y'); ?>
| </p>
<br>
<div class="tags"> ابرچسب :
<?php the_tags(' ', ', ', ''); ?>
</div>
</div>
<br>
<div class="single">
<?php comments_template(); ?>
</div>
</div>
<!----End-sidebar-a---->

<div class="sidebar-b">
<div class="tabs">
<?php include(TEMPLATEPATH .'/tabs.php'); ?>
</div>
<!----End-tabs---->

<?php include(TEMPLATEPATH .'/ads.php'); ?>
</div>
<!----End-sidebar-b---->

<div style="clear:both"></div>
</div>
<!----End-menu---->
<?php include(TEMPLATEPATH .'/footer.php'); ?>
<?php endwhile; ?>
<?php endif; ?>
</body></html>

لینک به ارسال

این کد را جایگزین کنید ببینید مشکل حل میشه


<?php get_header();?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="main">
<div class="sidebar-a"> <br />
<div class="single">
<div class="titrs">
<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a></h1>
</div>
<br>
<p style="text-align:justify">
<?php the_content(); ?>
</p>
<br>
<p style=" font-size:11px; color:#888;"> تاریخ انتشار :
<?php the_time('j M, Y'); ?>
| </p>
<br>
<div class="tags"> ابرچسب :
<?php the_tags(' ', ', ', ''); ?>
</div>
</div>
<br>
<div class="single">
<?php comments_template(); ?>
</div>
</div>
<!----End-sidebar-a---->

<div class="sidebar-b">
<div class="tabs">
<?php include(TEMPLATEPATH .'/tabs.php'); ?>
</div>
<!----End-tabs---->

<?php include(TEMPLATEPATH .'/ads.php'); ?>
</div>
<!----End-sidebar-b---->

<div style="clear:both"></div>
</div>
<!----End-menu---->
<?php include(TEMPLATEPATH .'/footer.php'); ?>
<?php endwhile; ?>
<?php endif; ?>
</body></html>

بله حل شد

یک دنیا ممنون

به سایت ما هم سر بزنید شاید تونستم جبران کنم

ویرایش شده توسط Morteza
لینک به ارسال
  • 1 سال بعد...

منم همچین مشکلی دارم، کسی میتونه کمکم کنه؟


<?php get_header(); ?>
<section id="content">
<div class="container clearfix">
<div class="postWrap">
<div <?php post_class(); ?>>
<div class="contentbox">
<?php while (have_posts()) { the_post(); ?>
<?php pinthis_setPostViews(get_the_ID()); ?>
<h3 class="title-1 border-color-1"><?php the_title(); ?></h3>
<?php if (has_post_thumbnail()) { ?>
<p class="featured-image">
<?php
$large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
$params = array('width' => 720);
$img = bfi_thumb($large_image_url[0], $params);
?>
<?php if ($img) { ?>
<img src="<?php echo $img; ?>" alt="<?php the_title(); ?>">
<?php } else {
the_post_thumbnail('full');
} ?>
</p>
<?php } ?>
<div class="metabar data clearfix">
<ul class="postmetas">
<li class="tooltip" title="<?php echo __('Post date', 'pinthis'); ?>"><span class="icon-post-date-2"><?php echo get_the_date('d.m.Y'); ?></span></li>
<li><span class="icon-author"><?php the_author_posts_link(); ?></span></li>
<li class="tooltip" title="<?php echo __('Total comments', 'pinthis'); ?>"><span class="icon-total-comments-2"><?php comments_number('0', '1', '%'); ?></span></li>
</ul>
<ul class="social-media-icons clearfix">
<li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_permalink(); ?>" class="border-color-3 icon-facebook tooltip" title="<?php echo __('Share on Facebook', 'pinthis'); ?>" target="_blank"><?php echo __('Facebook', 'pinthis'); ?></a></li>
<li><a href="https://plus.google.com/share?url=<?php echo get_permalink(); ?>" class="border-color-1 icon-gplus tooltip" title="<?php echo __('Share on Google+', 'pinthis'); ?>" target="_blank"><?php echo __('Google+', 'pinthis'); ?></a></li>
<li><a href="https://twitter.com/share?url=<?php echo get_permalink(); ?>" class="border-color-4 icon-twitter tooltip" title="<?php echo __('Share on Twitter', 'pinthis'); ?>" target="_blank"><?php echo __('Twitter', 'pinthis'); ?></a></li>
</ul>
</div>
<div class="textbox clearfix">
<?php the_content(); ?>
</div>
<?php wp_link_pages(array(
'before' => '<div class="page-links">' . __('Pages: ', 'pinthis' ),
'after' => '</div>',
'link_before' => '<span class="page-num">',
'link_after' => '</span>',
));
?>
<?php comments_template(); ?>
<?php } ?>
</div>
</div>
</div>
<aside class="sidebar">
<?php if (is_active_sidebar('page-sidebar')) { ?>
<?php dynamic_sidebar('page-sidebar'); ?>
<?php } else { ?>
<div class="contentbox">
<h4 class="title-1 border-color-2"><?php echo __('Meta', 'pinthis'); ?></h4>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</div>
<?php } ?>
</aside>
</div>
</section>
<?php get_footer(); ?>

لینک به ارسال

این کد را جایگزین کنید ببینید مشکلتون حل مشه


<?php get_header(); ?>
<section id="content">
<div class="container clearfix">
<div class="postWrap">
<div <?php post_class(); ?>>
<div class="contentbox">
<?php while (have_posts()) { the_post(); ?>
<?php pinthis_setPostViews(get_the_ID()); ?>
<h3 class="title-1 border-color-1">
<?php the_title(); ?>
</h3>
<?php if (has_post_thumbnail()) { ?>
<p class="featured-image">
<?php
$large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
$params = array('width' => 720);
$img = bfi_thumb($large_image_url[0], $params);
?>
<?php if ($img) { ?>
<img src="<?php echo $img; ?>" alt="<?php the_title(); ?>">
<?php } else {
the_post_thumbnail('full');
} ?>
</p>
<div class="metabar data clearfix">
<ul class="postmetas">
<li class="tooltip" title="<?php echo __('Post date', 'pinthis'); ?>"><span class="icon-post-date-2"><?php echo get_the_date('d.m.Y'); ?></span></li>
<li><span class="icon-author">
<?php the_author_posts_link(); ?>
</span></li>
<li class="tooltip" title="<?php echo __('Total comments', 'pinthis'); ?>"><span class="icon-total-comments-2">
<?php comments_number('0', '1', '%'); ?>
</span></li>
</ul>
<ul class="social-media-icons clearfix">
<li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_permalink(); ?>" class="border-color-3 icon-facebook tooltip" title="<?php echo __('Share on Facebook', 'pinthis'); ?>" target="_blank"><?php echo __('Facebook', 'pinthis'); ?></a></li>
<li><a href="https://plus.google.com/share?url=<?php echo get_permalink(); ?>" class="border-color-1 icon-gplus tooltip" title="<?php echo __('Share on Google+', 'pinthis'); ?>" target="_blank"><?php echo __('Google+', 'pinthis'); ?></a></li>
<li><a href="https://twitter.com/share?url=<?php echo get_permalink(); ?>" class="border-color-4 icon-twitter tooltip" title="<?php echo __('Share on Twitter', 'pinthis'); ?>" target="_blank"><?php echo __('Twitter', 'pinthis'); ?></a></li>
</ul>
</div>
<div class="textbox clearfix">
<?php the_content(); ?>
</div>
<?php wp_link_pages(array(
'before' => '<div class="page-links">' . __('Pages: ', 'pinthis' ),
'after' => '</div>',
'link_before' => '<span class="page-num">',
'link_after' => '</span>',
));
?>
<?php comments_template(); ?>
<?php } ?>
</div>
</div>
</div>
<aside class="sidebar">
<?php if (is_active_sidebar('page-sidebar')) { ?>
<?php dynamic_sidebar('page-sidebar'); ?>
<?php } else { ?>
<div class="contentbox">
<h4 class="title-1 border-color-2"><?php echo __('Meta', 'pinthis'); ?></h4>
<ul>
<?php wp_register(); ?>
<li>
<?php wp_loginout(); ?>
</li>
<?php wp_meta(); ?>
</ul>
</div>
<?php } ?>
</aside>
</div>
</section>
<?php get_footer(); ?>

لینک به ارسال
  • 2 سال بعد...

با سلام من هم همین مشکل را دارم  لطفا راهنمایی بفرمایید

<?php
/**
 * The template for displaying all pages.
 */
get_header(); ?>

<div class="clear"></div>

</header> <!-- / END HOME SECTION  -->

<?php
    zerif_after_header_trigger();
    $zerif_change_to_full_width = get_theme_mod( 'zerif_change_to_full_width' );
?>

<div id="content" class="site-content">

    <div class="container">

        <?php zerif_before_page_content_trigger(); ?>
        <?php
            if( (function_exists('is_cart') && is_cart()) || (function_exists('is_account_page') && is_account_page()) || (function_exists('is_checkout') && is_checkout() ) || !empty($zerif_change_to_full_width) ) {
                echo '<div class="content-left-wrap col-md-12">';
            }
            else {
                echo '<div class="content-left-wrap col-md-9">';
            }
        ?>
        <?php zerif_top_page_content_trigger(); ?>
        <div id="primary" class="content-area">

            <main itemscope itemtype="http://schema.org/WebPageElement" itemprop="mainContentOfPage" id="main" class="site-main">

                <?php while ( have_posts() ) : the_post(); 
                
                        get_template_part( 'content', 'page' );

                        if ( comments_open() || '0' != get_comments_number() ) :

                            comments_template();

                        endif;

                    endwhile; 
                ?>

            </main><!-- #main -->

        </div><!-- #primary -->

    <?php
        if( (function_exists('is_cart') && is_cart()) || (function_exists('is_account_page') && is_account_page()) || (function_exists('is_checkout') && is_checkout() ) || !empty($zerif_change_to_full_width) ) {
            zerif_bottom_page_content_trigger();
            echo '</div>';
            zerif_after_page_content_trigger();
        }
        else {
            zerif_bottom_page_content_trigger();
            echo '</div>';
            zerif_after_page_content_trigger();
            zerif_sidebar_trigger();
        }
        ?>    

    </div><!-- .container -->

<?php get_footer(); ?>

لینک به ارسال
  • 3 ماه بعد...

سلام.

من تازه کار هستم میشه کمکم کنین.

برگه ای ایجاد کردم اما محتویات خود برگه و همین طور زیر برگه ها رو بهم نشون نمیده!

لطفا بگین مشکل چیه؟

ممنونم.

ویرایش شده توسط مریم ورد
لینک به ارسال
  • 4 هفته بعد...

سلام من هم همین مشکل رو دارم کد های بالا رو جاایگزین کردم درست نشد

این آدرس سایت هست safirsang.ir از منوی بالا میتونید برگه ها رو ببینید

اینم سورس page.php

<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site may use a
 * different template.
 *
 *
 */
get_header(); ?>
	<?php
	$content_class = '';
	$sidebar_class = '';
	if(get_post_meta(get_the_ID(), 'rebuild_sidebar', true) == 'no-sidebar') {
		$content_class = 'has-no-sidebar';
		$sidebar_class = 'no-sidebar';
		$set_content_width ='';
	} elseif (get_post_meta(get_the_ID(),  'rebuild_sidebar', true) == 'right-sidebar') {
		$content_class = 'content-left alpha';
		$sidebar_class = 'sidebar-right omega';
		$set_content_width ='with-sidebar';
	} elseif (get_post_meta(get_the_ID(),  'rebuild_sidebar', true) == 'left-sidebar') {
		$content_class = 'content-right omega';
		$sidebar_class = 'sidebar-left alpha';
		$set_content_width ='with-sidebar';
	} elseif ( (get_post_meta(get_the_ID(),'rebuild_sidebar', true) == 'default') || (get_post_meta(get_the_ID(),  'rebuild_sidebar', true) == '') ) {
		if( $rebuild_data['sidebar_position'] == 'no-sidebar' ) {
			$content_class = 'has-no-sidebar';
			$sidebar_class = 'no-sidebar';
			$set_content_width ='';
		} elseif( $rebuild_data['sidebar_position'] == 'right-sidebar' ) {
			$content_class = 'content-left alpha';
			$sidebar_class = 'sidebar-right omega';
			$set_content_width ='with-sidebar';
		} elseif( $rebuild_data['sidebar_position'] == 'left-sidebar' ) {
			$content_class = 'content-right omega';
			$sidebar_class = 'sidebar-left alpha';
			$set_content_width ='with-sidebar';
		}
	}
	
	$bg_color='';
	
	if (get_post_meta(get_the_ID(),'rebuild_body_bg_color', true)!=''):
		$bg_color='style="background-color:'.get_post_meta(get_the_ID(),'rebuild_body_bg_color', true).'"';
	else:
		$bg_color='';
	endif;
	
	?>
    <main id="main" class="site-main" <?php echo esc_attr( $bg_color ); ?>>    
		<div id="primary" class="content-area">
            <div class="container <?php echo esc_attr( $set_content_width ); ?>">
                    <div class="sixteen columns jx-rebuild-padding <?php echo esc_attr( $content_class ); ?>">
                                        
					<?php while ( have_posts() ) : the_post(); ?>
        
                        <?php get_template_part( 'template-parts/content', 'page' ); ?>
        
                        <?php
                            // If comments are open or we have at least one comment, load up the comment template.
                            if ( comments_open() || get_comments_number() ) :
                                comments_template();
                            endif;
                        ?>
        
                    <?php endwhile; // End of the loop. ?>
                
                </div>
                <!-- EOF Body Content -->
                
                <div id="sidebar" class="four columns jx-rebuild-padding <?php echo esc_attr( $sidebar_class ); ?>">
                	<?php dynamic_sidebar( 'general-sidebar' ); ?>
                </div>
                <!-- EOF sidebar -->
                
            </div>
            <!-- EOF container -->
        </div><!-- #primary -->
    </main><!-- #main -->
    
<?php get_footer(); ?>

 

لینک به ارسال
  • 1 سال بعد...

سلام

منم همین مشکل رو دارم - مطالب صفحه اصلی که یک برگه است نمایش داده نمیشه

لطفا راهنمایی کنید

سورس page.php

 

<?php
    if ( !defined('ABSPATH') ){ die(); }
    
    global $avia_config, $wp_query;

    /*
     * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
     */
    get_header();

    /**
     * @used_by                enfold\config-wpml\config.php                10
     * @since 4.5.1
     */
    do_action( 'ava_page_template_after_header' );

      if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title();
      
      do_action( 'ava_after_main_title' );
     ?>

        <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>

            <div class='container'>

                <main class='template-page content  <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>>

                    <?php
                    /* Run the loop to output the posts.
                    * If you want to overload this in a child theme then include a file
                    * called loop-page.php and that will be used instead.
                    */

                    $avia_config['size'] = avia_layout_class( 'main' , false) == 'fullsize' ? 'entry_without_sidebar' : 'entry_with_sidebar';
                    get_template_part( 'includes/loop', 'page' );
                    ?>

                <!--end content-->
                </main>

                

                <?php

                //get the sidebar
                $avia_config['currently_viewing'] = 'page';
                get_sidebar();

                ?>

            </div><!--end container-->

        </div><!-- close default .container_wrap element -->

<?php 
        get_footer();
 

لینک به ارسال
  • 2 سال بعد...

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...