-
Dear BlueOwl,
I was following this old discussion to change the order of my portfolio items(http://blueowlcreative.com/support_wp/forums/topic/portfolio-items-order/), But for some reason I just couldn’t make it work. Please point me to right direction.
The original code from the editor, Aqua: Template – Portfolio Page Page Template (portfolio-three-column.php):
<ul id=”portfolio_items” class=”clearfix”>
<?php
$args = array(
‘post_type’ => ‘portfolio’,
‘posts_per_page’ => (ot_get_option(‘portfolio_items_per_page’,9) ? ot_get_option(‘portfolio_items_per_page’,9) : 9),
‘paged’ => $paged
);$gallery = new WP_Query($args);
while($gallery->have_posts()): $gallery->the_post();
if(has_post_thumbnail()):$data_types = ”;
$item_cats = get_the_terms($post->ID, ‘portfolio_category’);
if($item_cats):
foreach($item_cats as $item_cat) {
$data_types .= $item_cat->slug . ‘ ‘;
}
endif;I made the change to:
No.1<ul id=”portfolio_items” class=”clearfix”>
<?php
$args = array(
‘post_type’ => ‘portfolio’,
‘posts_per_page’ => (ot_get_option(‘portfolio_items_per_page’,9) ? ot_get_option(‘portfolio_items_per_page’,9) : 9),
‘paged’ => $paged);
$query = new WP_Query( array ( ‘orderby’ => ‘title’, ‘order’ => ‘DESC’ ) )
$gallery = new WP_Query($args);It doesn’t work. The whole page is gone.
No.2
$args = array(
‘post_type’ => ‘portfolio’,
‘posts_per_page’ => (ot_get_option(‘portfolio_items_per_page’,9) ? ot_get_option(‘portfolio_items_per_page’,9) : 9),
‘paged’ => $paged
‘orderby’ => ‘title’
‘order’ => ‘DESC’
);
$gallery = new WP_Query($args);It doesn’t work. when i refresh, the whole page is gone.
No.3
$args = array(
‘post_type’ => ‘portfolio’,
‘posts_per_page’ => (ot_get_option(‘portfolio_items_per_page’,9) ? ot_get_option(‘portfolio_items_per_page’,9) : 9),
‘paged’ => $paged
‘orderby’ => ‘title’
‘order’ => ‘DESC’
);
$query = new WP_Query($args);$gallery = new WP_Query($args);
It doesn’t work also. when i refresh, the whole page is gone.
Please help me with a right code, thank you so much!
- Theme support is offered to verified customers only. To post a topic go to your Theme Category and add your question at the page bottom.
Theme Categories
Recent Topics
- Alea updates
- Why "Fortune" theme is no longer available?
- PHP 8.1 Error
- Issue with WPB editor icons
- Issue with Icons and Text Alignment for Arabic Content
- Installing and Activating Plugin Fortuna Portfolio CPT (1/8)
- Testimonials page is blank
- warning boc_framework line 905
- Transparent header issue without changes
- Slider Revolution error