رفتن به مطلب

جعبه دانلود وردپرس


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

با سلام . دوستان کسی میتونه بگه برای اینکه جعبه دانلود در صورت نبود لینک دانلود در مطلب نشان داده نشه از چه کدی باید استفاده کنم.؟

مثلا در قرار دادن اس ام اس نیاز به جعبه دانلود نیست چیکا کنم که در اون نوشته جعبه دانلود نشون داده نشه و از چه شرطی استفاده کنم؟

www.mobileafzar.com

لینک به ارسال

میشه یکم توضیح بدید؟

تمام نوشته من که جعبه دانلود نیز جزو اونه داخل حلقه است یعنی من برای جعبه دانلود و نوشته حلقه جداگانه بزارم؟


<?php get_header(); ?>
<div id="main">
<?php include('left-sidebar.php'); ?>
<!--------start content & right_sidebar------->
<?php include('right-sidebar.php');?>
<!------------------start slidet----all--------->
<div id="allcontent">
<!------begin content------>
<div class="content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="title-content">
<h3>
<?php the_title(); ?>
</h3>
</div>
<div class="txt-content">
<?php the_content(); ?>
<div class="img-content">
<?php the_post_thumbnail();?>
</div>
<div class="download-box">
<h3>لینک دانلود</h3>
<hr />
<?php $link = get_post_meta($post->ID, 'link', true); ?>
<?php $ramz = get_post_meta($post->ID, 'ramz', true); ?>
<?php $about = get_post_meta($post->ID, 'about', true); ?>
<?php $size = get_post_meta($post->ID, 'size', true); ?>
<?php if ($link!="") : ?>
<p class="link"><a href="<?php echo $link; ?>"> لینک دانلود </a>
<?php endif;
if ($size!="") : ?>

<p class="size">حجم فایل: <?php echo $size; ?></p>
<?php endif;
if ($ramz!="") : ?>
<p class="ramz">پسورد فایل در صورت نیاز: <?php echo $ramz; ?></p>
<?php endif;
if ($about!="") : ?>
<p class="abuot">توضیحات: <?php echo $about; ?></p>
<?php endif; ?>
</p
>
</div>
<div class="barchasb">
<?php _e ('','framework'); ?>
<?php the_tags( 'برچسب‌ها: ', ' , ' , ''); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<!------end content------>
<div class="mortabet"><h4>مطالب مرتبط</h4><hr/>
<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo '';
$first_tag = $tags[0]->term_id;
$args=array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'showposts'=>5,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a><br/>
<?php
endwhile;
}
}
?>
</div>
<!--------->
<div id="author"> <?php echo get_avatar(get_the_author_id(),60); ?>
<div style="margin-right:70px; margin-top:-70px;">درباره نویسنده : <a href="<?php the_author_url ?>">
<?php the_author_meta('last_name'); ?>
</a> <br />
<?php the_author_meta('description'); ?>
</div>
</div>
<?php comments_template(); ?>
</div>
<!--------end content & right_sidebar------->
</div>
</div>
<?php get_footer(); ?>

ویرایش شده توسط mirreza
لینک به ارسال

سلام بر شما

کافیه شما باکس رو هم به صورت شرطی دربیارید: ینی اگر لینکی وجود داشت اونوقت باکس لینک نشون داده بشه.

این رو تست کنید:


<?php get_header(); ?>
<div id="main">
<?php include('left-sidebar.php'); ?>
<!--------start content & right_sidebar------->
<?php include('right-sidebar.php');?>
<!------------------start slidet----all--------->
<div id="allcontent">
<!------begin content------>
<div class="content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="title-content">
<h3>
<?php the_title(); ?>
</h3>
</div>
<div class="txt-content">
<?php the_content(); ?>
<div class="img-content">
<?php the_post_thumbnail();?>
</div>
<?php if ($link!="") : ?>
<div class="download-box">
<h3>لینک دانلود</h3>
<hr />
<?php $link = get_post_meta($post->ID, 'link', true); ?>
<?php $ramz = get_post_meta($post->ID, 'ramz', true); ?>
<?php $about = get_post_meta($post->ID, 'about', true); ?>
<?php $size = get_post_meta($post->ID, 'size', true); ?>
<?php if ($link!="") : ?>
<p class="link"><a href="<?php echo $link; ?>"> لینک دانلود </a>
<?php endif;
if ($size!="") : ?>

<p class="size">حجم فایل: <?php echo $size; ?></p>
<?php endif;
if ($ramz!="") : ?>
<p class="ramz">پسورد فایل در صورت نیاز: <?php echo $ramz; ?></p>
<?php endif;
if ($about!="") : ?>
<p class="abuot">توضیحات: <?php echo $about; ?></p>
<?php endif; ?>
</p>
</div>
<?php endif; ?>
<div class="barchasb">
<?php _e ('','framework'); ?>
<?php the_tags( 'برچسب‌ها: ', ' , ' , ''); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<!------end content------>
<div class="mortabet"><h4>مطالب مرتبط</h4><hr/>
<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo '';
$first_tag = $tags[0]->term_id;
$args=array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'showposts'=>5,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a><br/>
<?php
endwhile;
}
}
?>
</div>
<!--------->
<div id="author"> <?php echo get_avatar(get_the_author_id(),60); ?>
<div style="margin-right:70px; margin-top:-70px;">درباره نویسنده : <a href="<?php the_author_url ?>">
<?php the_author_meta('last_name'); ?>
</a> <br />
<?php the_author_meta('description'); ?>
</div>
</div>
<?php comments_template(); ?>
</div>
<!--------end content & right_sidebar------->
</div>
</div>
<?php get_footer(); ?>

لینک به ارسال

قوانین مشاهده کنید

صبر کنید تا پاسخ بگیرید

درضمن بسته به نوع تعریف ضمینه دلخواه باید دید

لینک به ارسال

<?php get_header(); ?>
<div id="main">
<?php include('left-sidebar.php'); ?>
<!--------start content & right_sidebar------->
<?php include('right-sidebar.php');?>
<!------------------start slidet----all--------->
<div id="allcontent">
<!------begin content------>
<div class="content">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div class="title-content">
<h3>
<?php the_title(); ?>
</h3>
</div>
<div class="txt-content">
<?php the_content(); ?>
<div class="img-content">
<?php the_post_thumbnail();?>
</div>
<?php
$link = get_post_meta($post->ID, 'link', true);
if ($link!="") : ?>
<div class="download-box">
<h3>لینک دانلود</h3>
<hr />
<?php $ramz = get_post_meta($post->ID, 'ramz', true); ?>
<?php $about = get_post_meta($post->ID, 'about', true); ?>
<?php $size = get_post_meta($post->ID, 'size', true); ?>
<?php if ($link!="") : ?>
<p class="link"><a href="<?php echo $link; ?>"> لینک دانلود </a>
<?php endif;
if ($size!="") : ?>

<p class="size">حجم فایل: <?php echo $size; ?></p>
<?php endif;
if ($ramz!="") : ?>
<p class="ramz">پسورد فایل در صورت نیاز: <?php echo $ramz; ?></p>
<?php endif;
if ($about!="") : ?>
<p class="abuot">توضیحات: <?php echo $about; ?></p>
<?php endif; ?>
</p>
</div>
<?php endif; ?>
<div class="barchasb">
<?php _e ('','framework'); ?>
<?php the_tags( 'برچسب‌ها: ', ' , ' , ''); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<!------end content------>
<div class="mortabet"><h4>مطالب مرتبط</h4><hr/>
<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo '';
$first_tag = $tags[0]->term_id;
$args=array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'showposts'=>5,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a><br/>
<?php
endwhile;
}
}
?>
</div>
<!--------->
<div id="author"> <?php echo get_avatar(get_the_author_id(),60); ?>
<div style="margin-right:70px; margin-top:-70px;">درباره نویسنده : <a href="<?php the_author_url ?>">
<?php the_author_meta('last_name'); ?>
</a> <br />
<?php the_author_meta('description'); ?>
</div>
</div>
<?php comments_template(); ?>
</div>
<!--------end content & right_sidebar------->
</div>
</div>
<?php get_footer(); ?>

لینک به ارسال

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

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

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

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

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

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

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

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

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