Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress custom post type Query

<?php 
    query_posts(array( 
        'post_type' => 'portfolio',
        'showposts' => 10 
    ) );  
?>
<?php while (have_posts()) : the_post(); ?>
        <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
        <p><?php echo get_the_excerpt(); ?></p>
<?php endwhile;?>
Comment

wp_query custom post type

/* WordPress: Query a custom post type */

// Query all Case Study post types
<?php query_posts('post_type=case_studies'); ?>
Comment

PREVIOUS NEXT
Code Example
Php :: referencing constant in config laravel 
Php :: laravel one to many relationship example 
Php :: php return multiple values 
Php :: laravel has many limit 
Php :: laravel one command for model table and controller 
Php :: laravel migration change column order 
Php :: time characters php 
Php :: -regular_price 
Php :: php create html code 
Php :: laravel migration mediumint length 
Php :: yii2 sendemail extension 
Php :: year dropdown loop in php 
Php :: laravel transactions eloquent 
Php :: simple php round Passing parameters with mode 
Php :: check if any values are the same in an array php 
Php :: laravel auth sha-1 
Php :: laravel custom validation 
Php :: enable trash for media wordpress 
Php :: like query with prepare wordpress 
Php :: wordpress get the short permalink 
Php :: Calculate Math Expression From A String Text With PHP 
Php :: php sec to hours/minuts 
Php :: reindex after post api magento 2 
Php :: check date is in the last 24 hours? 
Php :: Laravel htaccess for aws ec2 
Php :: Gate::before not working laravel 8 
Php :: php file upload code not working in ubuntu 
Php :: laravel pivot select fields 
Php :: create migration command in laravel 
Php :: laravel index method 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =