Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // double shortcodes
- function double_shortcodes($atts){
- extract( shortcode_atts( array(
- 'title' => 'Enter Default Value',
- 'des' => 'Enter Default Value',
- ), $atts, 'double' ) );
- $q = new WP_Query(
- array('posts_per_page' => 4, 'post_type' => 'portfolio', 'order' => 'ASC')
- );
- $list = '';
- while($q->have_posts()) : $q->the_post();
- $idd = get_the_ID();
- $portfolio_photo_lg = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'portfolio-large' );
- $portfolio_photo_sm = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'portfolio-small' );
- $filter = get_post_meta($idd, 'filter', true);
- $list .= '';
- endwhile;
- $list.= '';
- wp_reset_query();
- return $list;
- }
- add_shortcode('double', 'double_shortcodes');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement