Forum Replies Created
- AuthorPosts
- November 20, 2019 at 5:23 am in reply to: How can get destinations featured image in custom loop? #21422November 20, 2019 at 5:20 am in reply to: How can get destinations featured image in custom loop? #21421
karankcoresys
ParticipantThank you fix the problem! The support is so good!
November 18, 2019 at 1:37 pm in reply to: How can get destinations featured image in custom loop? #21375karankcoresys
ParticipantHello,
Your code working like this: http://rankonone.com/dev/westchina/destinations-test/
Still no destination image.
I am talking about this: https://nimb.ws/VvBijL
November 18, 2019 at 7:08 am in reply to: How can get destinations featured image in custom loop? #21366karankcoresys
ParticipantThank you for your reply!
I used this code, but it’s now showing an empty page. If my code issue is beyond the support. Just let me know how can I show all destinations on the page with the image in the grid style. please provide any shortcode, code or anything. I just want to show all locations/destinations on the page. Like this: http://rankonone.com/dev/westchina/destinations/, that will be ok if tours not come, just want to show destinations and image.
Thank you!
November 16, 2019 at 1:56 pm in reply to: How can get destinations featured image in custom loop? #21341karankcoresys
ParticipantThank you for the reply, but it’s not worked, your plugin must have the taxonomy image display option.
i tried code but not worked.
please let me know how to use this code!
`<?php
$post_type = ‘itineraries’;
$custom_tax = ‘travel_locations’;
$custom_args = array(
‘parent’ => 0
);
$custom_terms = get_terms($custom_tax, $custom_args);
foreach($custom_terms as $custom_term) {
$term_link = get_term_link( $custom_term );
wp_reset_query();
$args = array(‘post_type’ => ‘itineraries’,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘travel_locations’,
‘field’ => ‘slug’,
‘terms’ => $custom_term->slug,),
),
); ?>
<?php
$loop = new WP_Query($args);
if($loop->have_posts()) { ?>
<?php
while($loop->have_posts()) : $loop->the_post(); ?>
//some content here
<?php
endwhile;?>
<?php } }?>’November 14, 2019 at 11:27 am in reply to: How can get destinations featured image in custom loop? #21296karankcoresys
ParticipantPlease, sir help, it’s not a big problem from your side, My client purchased the pro version of wptravel. We have the license key. It’s just the last problem we need to fix and our website will gonna complete.
karankcoresys
ParticipantI am also a developer, it’s okay if it does not work. Can you just help me with to show all the destinations with the thumbnail?
I used this code
`$args = array(
‘type’ => ‘itineraries’,
‘child_of’ => 0,
‘parent’ => ”,
‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
‘hide_empty’ => 1,
‘hierarchical’ => 1,
‘exclude’ => ”,
‘include’ => ”,
‘number’ => ”,
‘taxonomy’ => ‘travel_locations’,
‘pad_counts’ => false );
$categories = get_categories($args);
$attachments = get_children( $args );foreach ($categories as $category):
// set up a new query for each category, pulling in related posts.
$services = new WP_Query(
array(
‘post_type’ => ‘itineraries’,
‘showposts’ => -1,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘travel_locations’,
‘terms’ => array( $category->slug ),
‘field’ => ‘slug’
)
)
)
);
?>
<h3><?php echo $category->name; ?></h3>- <?php while ($services->have_posts()) : $services->the_post(); ?>
- <?php the_title(); ?>
<?php endwhile; ?>
<?php
// Reset things, for good measure
$services = null;
wp_reset_postdata();
// end the loop
endforeach;’just need to call thumbnail in this code!
karankcoresys
ParticipantThank you for reply,
So can you tell any how i can move related trips in the tabs?
- AuthorPosts