رفتن به مطلب

قرار دادن چند خط اول پست در تگ های اچ 2 تا شش با زمینه دلخواه


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

سلام مجدد ..دوستان کسی میدونه چطور میشه چهار خط در ابتدای پست قرار داد با استفاده از زمینه دلخواه که مربوط به همون پست باشه و در درون تگ های ا2 تا شش این خطوط قرار بگیرند؟؟این کد زمینه دلخواه من هست میخوام یه کاری کنم بتونم چهار خط به اختیار به ابتدای پست هام اضافه کنم که مربوط به همون پسته و در تگ های ذکر شده قرار بگیرند

امیدوارم منظورمو رسونده باشم..سپاس

<?php

/*

* Content display template, used for both single and index/category/search pages.

* Iconic One uses custom excerpts on search, home, category and tag pages.

* @package WordPress - Themonic Framework

* @subpackage Iconic_One

* @since Iconic One 1.0

*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php if ( is_sticky() && is_home() && ! is_paged() ) : // for top sticky post with blue border ?>

<div class="featured-post">

<?php _e( 'Featured Article', 'themonic' ); ?>

</div>

<?php endif; ?>

<header class="entry-header">

<?php if ( is_single() ) : ?>

<h2 class="entry-title"><?php the_title(); ?></h2>

<?php else : ?>

<h2 class="entry-title">

<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'themonic' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>

</h2>

<?php endif; // is_single() ?>

<?php if ( is_single() ) : //for date on single page ?>

<div class="below-title-meta">

<div class="adt">

<?php _e('By','themonic'); ?>

<span class="author">

<?php echo the_author_posts_link(); ?>

</span>

<span class="meta-sep">|</span>

<?php echo get_the_date(); ?>

</div>

<div class="adt-comment">

<a class="link-comments" href="<?php comments_link(); ?>"><?php comments_number(__('0 Comment','themonic'),__('1 Comment'),__('% Comments')); ?></a></span>

</div>

</div><!-- below title meta end -->

<?php endif; // display meta-date on single page() ?>

</header><!-- .entry-header -->

<?php if ( is_single() ) : // Display Excerpts for Search, home, category and tag pages ?>

<div class="entry-summary">

<!-- Ico nic One home page thumbnail with custom excerpt -->

<div class="excerpt-thumb">

<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>

<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themonic' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">

<?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?>

</a>

<?php endif;?>

</div>

<div class="single-post-info">

<?php if ( get_post_meta( get_the_ID(), 'file_size', true ) ) : ?><p><strong class="attributes">File Size: <span class="black"><?php echo get_post_meta($post->ID, 'file_size', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'quality', true ) ) : ?><p><strong class="attributes">Quality: <span class="black"><?php echo get_post_meta($post->ID, 'quality', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'director', true ) ) : ?><p><strong class="attributes">Director: <span class="black"><?php echo get_post_meta($post->ID, 'director', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'releasedate', true ) ) : ?><p><strong class="attributes">Release Date: <span class="black"><?php echo get_post_meta($post->ID, 'releasedate', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'genre', true ) ) : ?><p><strong class="attributes">Genre: <span class="black"><?php echo get_post_meta($post->ID, 'genre', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'stars', true ) ) : ?><p><strong class="attributes">Stars: <span class="black"><?php echo get_post_meta($post->ID, 'stars', true); ?></span></strong></p><?php endif; ?>

<?php $mid_var = get_post_meta($post->ID, 'screenshot',true);if(isset($mid_var) && !empty($mid_var)) : ?>

<img src="<?php echo get_post_meta($post->ID, 'screenshot',true); ?>" alt="screenshotmovie" title="screenshotmovie" width="300" height="200" />

<?php endif;?>

<?php if ( get_post_meta( get_the_ID(), 'screenshott', true ) ) : ?><p><strong class="attributes">Screenshott: <span class="black"><a href="<?php echo get_post_meta($post->ID, 'screenshott', true); ?>">Click Here</a></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'shortstory', true ) ) : ?><p><strong class="attributes">Shortstory: <span class="black"><?php echo get_post_meta($post->ID, 'shortstory', true); ?></span></strong></p><?php endif; ?>

</div>

<div class="download-links">

<?php if ( get_post_meta( get_the_ID(), 'upz', true ) ) : ?><p><strong class="attributes"style="color:red">Uploadbaz:</strong><a href="<?php echo get_post_meta($post->ID, 'upz', true); ?>">  Download Link</a></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'hex', true ) ) : ?><p><strong class="attributes"style="color:red">Hexupload:</strong><a href="<?php echo get_post_meta($post->ID, 'hex', true); ?>">  Download Link</a></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'fire', true ) ) : ?><p><strong class="attributes"style="color:red">Firerive ( putlocker ):</strong><a href="<?php echo get_post_meta($post->ID, 'fire', true); ?>">  Download Link</a></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'net', true ) ) : ?><p><strong class="attributes"style="color:red">Netload:</strong><a href="<?php echo get_post_meta($post->ID, 'net', true); ?>">  Download Link</a></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'box', true ) ) : ?><p><strong class="attributes"style=" color:red">Uptobox:</strong><a href="<?php echo get_post_meta($post->ID, 'box', true); ?>">  Download Link</a></p><?php endif; ?>

<p style="text-align: center;"><span style="color: #0000ff;"><strong>User Account Password Free Direct Download !! Quick Click!!! Wooooow!</strong></span></p>

<p style="text-align: center;"><span style="color: #ff0000;"><strong>UploadBAZ.COM</strong></span></p>

<p style="text-align: center;"><strong><span style="color: #0000ff;">User1</span></strong>: <strong><span style="color: #00ff00;">M4DL</span></strong></p>

<p style="text-align: center;"><span style="color: #ff00ff;"><strong>Pass1</strong></span>: <span style="color: #800080;"><strong>4401733</strong></span></p>

<p style="text-align: center;"><span style="color: #0000ff;"><strong>User2: <span style="color: #008080;">M4DL1</span></strong></span></p>

<p style="text-align: center;"><strong><span style="color: #ff00ff;">Pass2</span>:<span style="color: #008000;"><strong>4401733</strong></span></strong></p>

<p style="text-align: center;">--------------------------------------------------------------------------</p>

<?php if ( get_post_meta( get_the_ID(), 'file', true ) ) : ?><p><strong class="attributes"style="color:red">Filedap:</strong><a href="<?php echo get_post_meta($post->ID, 'file', true); ?>">  Uploading ..</a></p><?php endif; ?>

<br/>

<!--p class="password"><strong class="attributes" style="color:red">Password: Movie4Download.Com</strong></p-->

</div>

</div><!-- .entry-summary -->

<?php else : ?>

<div class="entry-content">

<div class="excerpt-thumb">

<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>

<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themonic' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">

<?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?>

</a>

<?php endif;?>

</div>

<div class="post-info">

<?php if ( get_post_meta( get_the_ID(), 'file_size', true ) ) : ?><p><strong class="attributes">File Size: <span class="black"><?php echo get_post_meta($post->ID, 'file_size', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'quality', true ) ) : ?><p><strong class="attributes">Quality: <span class="black"><?php echo get_post_meta($post->ID, 'quality', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'director', true ) ) : ?><p><strong class="attributes">Director: <span class="black"><?php echo get_post_meta($post->ID, 'director', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'releasedate', true ) ) : ?><p><strong class="attributes">Release Date: <span class="black"><?php echo get_post_meta($post->ID, 'releasedate', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'genre', true ) ) : ?><p><strong class="attributes">Genre: <span class="black"><?php echo get_post_meta($post->ID, 'genre', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'stars', true ) ) : ?><p><strong class="attributes">Stars: <span class="black"><?php echo get_post_meta($post->ID, 'stars', true); ?></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'screenshot', true ) ) : ?><p><strong class="attributes">Screenshot: <span class="black"><a href="<?php echo get_post_meta($post->ID, 'screenshot', true); ?>">Click Here</a></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'screenshott', true ) ) : ?><p><strong class="attributes">Screenshott: <span class="black"><a href="<?php echo get_post_meta($post->ID, 'screenshott', true); ?>">Click Here</a></span></strong></p><?php endif; ?>

<?php if ( get_post_meta( get_the_ID(), 'shortstory', true ) ) : ?><p><strong class="attributes">Shortstory: <span class="black"><?php echo get_post_meta($post->ID, 'shortstory', true); ?></span></strong></p><?php endif; ?>

<div class="readmore"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'themonic' ), the_title_attribute( 'echo=0' ) ) ); ?>"><img src="http://movie4download.com/wp-content/uploads/2014/04/btn_more.png" alt="Read More..." title="Read More..." /></a></div>

</div>

</div><!-- .entry-content -->

<?php endif; ?>

<footer class="entry-meta">

<span>Category: <?php the_category(' '); ?></span> <span><?php the_tags(); ?></span>

<?php edit_post_link( __( 'Edit', 'themonic' ), '<span class="edit-link">', '</span>' ); ?>

<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>

<div class="author-info">

<div class="author-avatar">

<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'themonic_author_bio_avatar_size', 68 ) ); ?>

</div><!-- .author-avatar -->

<div class="author-description">

<h2><?php printf( __( 'About %s', 'themonic' ), get_the_author() ); ?></h2>

<p><?php the_author_meta( 'description' ); ?></p>

<div class="author-link">

<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">

<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'themonic' ), get_the_author() ); ?>

</a>

</div><!-- .author-link -->

</div><!-- .author-description -->

</div><!-- .author-info -->

<?php endif; ?>

</footer><!-- .entry-meta -->

</article><!-- #post -->

لینک به ارسال

درود.

متوجه کاری که قصد انجام دارید نشدم اما برای اینکه قبل از مطلب فرخوانی بشه ساده ترین روش این هست زمینه های دلخواه را قبل از تابع the_content فراخوانی و نمایش بدید تا در بالای نوشته پست قرار بگیرد.

لینک به ارسال

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

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

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

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

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

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

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

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

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