Skip Navigation

[Resolved] List of posts after filtering

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 13 replies, has 2 voices.

Last updated by anastasiaP 6 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#600971

Hi!
I use Premium theme and this theme use special fields (tabs) for insertion in post (and on Archive page) links of Youtube/Vimeo, Soundcloud and for insertion images for displaying Gallery (for post formats).

So, how i can to insert in "Views template maker" this fields if (for example) checked Video in post format and included in special tab link of video?

#601005

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I would like to have more information how those fields are setup and where exactly you would like to display those field values. I can better guide you once I see how such fields are setup and if it is possible using Toolset to display such field or not.

Could you please share problem URL and where can I see those fields and where exactly you would like to display it.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#601679

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

OK - so the format box on rightside is custom taxonomy?

I need to know first how it stored in database and that is why I need access details so that I can check first how data is stored inside the database and then I can better guide you in right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#602109

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sorry - do you mean I should create new post field group to newly created CTP and display it? If yes, you want to go with custom field approach?

#602228

I mean, U can use anyone created CPTs (but they on Russian) or create new (if don't like someone).

#602404

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

ok thanks- do you mean to say that you want to display selected video in post using google map on map marker - so when user click on map marker it should display selected video on map marker popup?

#602476

No no!!!
I want only display post lists on "Filter page" with "Video, Audio and Gallery" formats.

#602501

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would like to resolve my doubt here, when you say "Filter page", are you talking about post archive view for the CPT? If yes - could you please share exact link to your post archive view.

I have set the next reply to private which means only you and I have access to it.

#602590

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - the fields that stores the video URL value is "_format_video_embed", so to use this field with view's I've added this field to section: Toolset => Settings => Front-end Content => Hidden custom fields

Now, I've added following code to your current theme's functions.php file:

function func_display_embed_video($atts,$content) {

	return wp_oembed_get($atts['video_url']); 

}
add_shortcode( 'display_video', 'func_display_embed_video');

And later I've used the above shortcode to display the video as given under inside your view's output editor:

[display_video video_url="[wpv-post-field name='_format_video_embed']"]

Could you please check and confirm that you able to see the video as well.

#603233

Hi Minesh!
Thank U very much. It working very nice.

I created "Audio format" and it work nice too, but not work "Gallery format", can U help?
And how i can display "limited number of characters" for CPF?

And i have one more question: can i filter my posts without "Views"?

#603343

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Glad to know that it works as expected and solution help you to resolve your issue.

May I kindly ask you to open a new ticket for your each new question. This will help other users searching on the forum. Thank you for understanding.

#603515

Ok, i will open new ticket for second problem, but we did not solve this problem to the end. Video and Audio workign, but not Gallery, can U help?

#603723

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - its was not that much easy to display gallery.

Your them Swanky by Themehold uses serialize array to stored gallery image ids.

I've added following shortcode to your current theme's functions.php file:

add_shortcode('show_gallery', 'func_show_gallery');
function func_show_gallery($atts, $content = '') {
    global $post;
	
	$swanky_images = get_post_meta( $post->ID, '_format_gallery_images', true );
	if($swanky_images) :
           $str = '<div class="post-img"><ul class="bxslider_post">';
              
                foreach($swanky_images as $swanky_image):
                    $swanky_the_image = wp_get_attachment_image_src( $swanky_image, 'swanky-full-thumb' );
                    $swanky_alt_text = get_post_meta($post->ID, '_wp_attachment_image_alt', true);

                    if(empty($swanky_alt_text)) // if not, use the caption
                    {
                      $swanky_attachment = get_post($post->ID);
                      $swanky_alt_text = trim(strip_tags( $swanky_attachment->post_excerpt ));
                    }
                    if(empty($swanky_alt_text)) // finally, use the title
                    { 
                      $swanky_attachment = get_post($post->ID);
                      $swanky_alt_text = trim(strip_tags( $swanky_attachment->post_title )); 
                    }
                 
					$swanky_the_caption = get_post_field('post_excerpt', $swanky_image);
					$title = '';
					if($swanky_the_caption):
					$title = esc_attr($swanky_the_caption);
					endif;


                  $str .= '<li>';
                  $str .= '<img src="'.esc_url($swanky_the_image[0]).'" alt="'.esc_attr($swanky_alt_text).'" title="'.$title.'"/>';
                  $str .= '</li>';
                      
                 endforeach;
				 $str .= '</ul></div>';
				 
				 return $str;
		endif;
}

And updated your view's output accordingly for gallery image to display gallery using shortcode [show_gallery] :

[wpv-conditional if="( '[wpv-post-format]' eq 'gallery' )"]
         <article class="post_list post [wpv-post-class]">
            <div class="side_left">
                <div class="post-img gallery">
                   [show_gallery]
                </div>
            </div>

            <div class="side_right">
                <span class="cat-blog">
                    <a href="<em><u>hidden link</u></em>">Комментарии на Евангелие</a>
                </span>
                <div class="post-header">
                    <h2>[wpv-post-link]</h2>   
                </div>
                <div class="decorater"><div class="line"><span class="dot"></span></div></div>
                <div class="post-entry">                    
                  <p>
                  	[limit_content length="311"][types field='eva-text-kommentariya' output='word'][/types][/limit_content]
                  </p>
                </div>
                <div class="post-meta">  
                    <div class="meta_date"><span class="posted">Опубликовано </span> [wpv-post-date]</div>
                </div>          
            </div>    
        </article>
    [/wpv-conditional]

Could you please confirm that you able to see gallery now and the solution I provided help you to resolve your issue.

#603881

Fantastic, nice one!
Thank U very much! It's working very nice!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.