This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="testimonial"> | |
<?php | |
$q = new WP_Query( | |
array('post_type' => array('testimonials'), | |
'post_status' => array('publish'), | |
'orderby' => 'date', | |
'order' => 'ASC', | |
'posts_per_page' => $sitem, | |
'service-category' => $category) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ye post type ki registertation hain) | |
<?php /** | |
* Registers a new post type | |
* @uses $wp_post_types Inserts new post type object into the list | |
* | |
* @param string Post type key, must not exceed 20 characters | |
* @param array|string See optional args description above. | |
* @return object|WP_Error the registered post type object, or an error object | |
*/ | |
function slider() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $my_query = new WP_Query('page_id=13'); | |
while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
<h2><?php the_title(); ?></h2> | |
<?php the_content(); ?> | |
<?php endwhile; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container blogframe"> | |
<div class="row"> | |
<?php | |
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; | |
$q = new WP_Query( | |
array( | |
'post_type' => array('post'), | |
'post_status' => array('publish'), | |
'orderby' => 'date', | |
'order' => 'ASC', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(blog post k singal.php ka loop hain) | |
<div class="margin100"></div> | |
<div class="container"> | |
<div class="row"> | |
<?php /* The loop */ ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="col-md-8 col-sm-8"> | |
<article class="posting"> | |
<?php | |
if(has_post_thumbnail()){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pagination($pages = '', $range = 4) | |
{ | |
$showitems = ($range * 2)+1; | |
global $paged; | |
if(empty($paged)) $paged = 1; | |
if($pages == '') | |
{ | |
global $wp_query; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pagination {clear:both;padding:20px 0;position:relative;font-size:11px;line-height:13px;} | |
.pagination span, .pagination a {display: block;float: left;margin: 2px 2px 2px 0;padding: 11px 17px 11px 17px;text-decoration: none;width: auto;color: #fff;background: #555;font-size: 18px;} | |
.pagination a:hover{color:#fff;background: #AA3F94;} | |
.pagination .current {padding: 11px 17px 11px 17px;background: #AA3F94;color: #fff;font-size: 18px;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(agar loop main BG image ho tu ye loop use kare ge = loop ka akari main background ki css rakhe ge) | |
<?php $my_query = new WP_Query('page_id=45'); | |
while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
<?php | |
if(has_post_thumbnail()){ | |
$thumbnailaaa = wp_get_attachment_image_src(get_post_thumbnail_id(),'full', true); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ye wordpress loop counter hain agar meri post type multiple ho tu use hogi) | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<?php | |
$q = new WP_Query( | |
array('post_type' => array('product'), | |
'post_status' => array('publish'), | |
'orderby' => 'date', | |
'order' => 'ASC', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agat wordpress main har page per alag header image leni ho tu is k liye code dege | |
<?php $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(),'full', true); ?> | |
<section class="treatmentpage" style="background: url(<?php echo $thumbnail[0]; ?>) no-repeat;"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<h1><?php the_title(); ?></h1> | |
<ol class="breadcrumb"> |
OlderNewer