khudadad
Forum Replies Created
-
The chat window is not showing.
I couldn’t find the short code? Where is that?Forum: Fixing WordPress
In reply to: How to filter posts by category?Try this:
`$args = array(
‘category_name’=>’category-name’,
‘posts_per_page’=> 10,
);
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query- >have_posts()): $query->the_post(); ?>
<div class=”thumbnail”>
<?php if (has_post_thumbnail()) {
the_post_thumbnail(‘featured’);
} ?>
<div class=”caption caption-content”>
<h3 class=”product-name”><?php the_title(); ?></h3>
<p class=”text-muted”>
<strong>???????:</strong> <?php the_author();?>
?? ?????: <?php the_date(); ?></p>
<p> <?php the_excerpt(); ?> </p>
<div></div>
</div>
<hr>
</div>
<?php endwhile;
}`Forum: Plugins
In reply to: [WooCommerce Products Carousel all in one] Single Product Page ProblemHi, I’m using WordPress 4.5.1 and want to display custom post type (product) but it’s not showing the single-product page instead returns index.
My index<?php $args = array('post_type'=>'my_product','posts_per_page'=>1); $product = new WP_Query($args); if($product->have_posts()): while($product->have_posts()): $product->the_post(); ?> <div class="media"> <div class="col-sm-12 col-lg-7 arr"> <div class="media-body" style="padding-right: 20%;"> <h4 class="media-heading"> <?php the_title();?> </h4> <hr class="gold-hr"> <p> <?php the_excerpt();?> </p> <a href="<?php the_permalink();?>"><b>????? ??????</b> <i class="fa fa-chevron-left"></i></a> </div> </div> my single-product:
<div class=”panel”>
<div class=”panel-heading”><h4><?php the_title();?> </h4></div>
<div class=”panel-body”>
<?php if (have_posts()): while(have_posts()): the_post(); ?>
<div class=”thumbnail”>
<?php if(has_post_thumbnail()) { the_post_thumbnail(‘featured’); }?>
<div class=”caption”>
<h3><?php the_title();?></h3>
<p class=”text-muted”>???????: <?php the_author();?> ?? ?? ?????: <?php the_date();?></p>
<p> <?php the_content();?> </p>
</div>
</div>
<?php endwhile; endif; ?></div>
</div>
any help.
thanks.