• Resolved jetpackjack

    (@jetpackjack)


    So we’re working with the plugin and using it to pull in videos as a post type on our main page here:

    https://mcds1.sg-host.com/videos/

    When a user goes in to a video they then have the option to click the small folder icon underneath which then takes them to the category pages, this page is good but we want to add our Ajax Search Pro to the page so users can search through that particular category of videos.

    We can do this through creation of a page or we can do this on the category page but what is best?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor wpvideogallery

    (@wpvideogallery)

    Our video category page is simply a WordPress page that you can find under your “WordPress Admin Dashboard => Pages” menu.

    Technically, all our categories load in the same video category page https://mcds1.sg-host.com/video-category/ appended by the selected category slug.

    So,
    1. Kindly go to your “WordPress Admin Dashboard => Pages” menu.

    2. Find a page with the title “Video Category” and edit and open that.

    3. You would see that the editor field already has our [aiovg_category] shortcode. So, simply add your “Ajax Search Pro” shortcode above our category shortcode.

    The above steps would help you to add the “Ajax Search Pro” search form on our single category pages. But, I don’t think the search will work as it is.

    Actually, you are expecting an integration between both the plugin. So, I’m afraid that you may need to write some code ??

    Alternatively, you can use a search form that comes with our plugin for the same. Please let me know if you are interested. So, I can share the relevant instructions.

    Thread Starter jetpackjack

    (@jetpackjack)

    Thank you, appreciate it – are you able to share relevant instructions on using your search form? Is it Ajax also?

    Thanks!

    Plugin Contributor wpvideogallery

    (@wpvideogallery)

    1. Kindly add the following code to the bottom of your theme’s functions.php file,

    function aiovg_override_search_page_url( $url ) {
    	global $post;
    
    	$page_settings = get_option( 'aiovg_page_settings' );
    	if ( $post->ID == $page_settings['category'] ) {			
    		if ( $slug = get_query_var( 'aiovg_category' ) ) {
    			$term = get_term_by( 'slug', $slug, 'aiovg_categories' );
    			$url = aiovg_get_category_page_url( $term );
    		}				
    	}
    
    	return $url;
    }
    add_filter( 'aiovg_search_page_url', 'aiovg_override_search_page_url' );
    
    function aiovg_override_query_args( $args, $attributes ) {
    	if ( isset( $attributes['shortcode'] ) && $attributes['shortcode'] == 'aiovg_category' ) {
    		if ( isset( $_GET['vi'] ) ) {
    			$args['s'] = sanitize_text_field( $_GET['vi'] );
    		}
    	}
    
    	return $args;
    }
    add_filter( 'aiovg_query_args', 'aiovg_override_query_args', 10, 2 );

    2. Then, edit open the video category page https://mcds1.sg-host.com/video-category/ and add the shortcode [aiovg_search_form] above the [aiovg_category] shortcode. So, the WP Editor field will look like this,

    [aiovg_search_form]
    [aiovg_category]

    Save the change and check now.

    But, sorry that our search form doesn’t use Ajax. But, this will work.

    Thread Starter jetpackjack

    (@jetpackjack)

    Thank you team, that is now working.

    Thread Starter jetpackjack

    (@jetpackjack)

    Hi, I wanted to get back on this as you mentioned on my other post here about using Elementor, which I do.

    I’m using the Posts widget which allows us some good control in Elementor. I can easily display ‘Videos’ in the Query > Source but what would be the final piece to the puzzle would be if we could somehow show ‘video-categories’ in there which would give us the styling and control we need and the ability to pull these in all over the site, when needed.

    Is there a way to do that? I can build a similar prototype to your plugin using CPT UI and Advanced Custom Fields but I cannot understand how to pull in taxonomy / categories in as a post type on the Post widget settings in Elementor. There are plugins to do this but I wanted to keep the site as light from plugins as possible.

    Plugin Contributor wpvideogallery

    (@wpvideogallery)

    Sorry, I’m not clear about your last question.

    The main topic of this post is “Video Category with search”. So, keeping that in mind, I understand you are looking for an option to replace the [aiovg_category] shortcode with the Elementor’s “Posts Widget”. Am I correct?

    If yes, sorry this is not possible. [aiovg_category] is a dynamic shortcode and it takes the category input from the URL. This should be not possible with the Elementor’s “Posts Widget” ??

    Also, I doubt that you speak about using the “Posts Widget” plugin on other pages of your website to display the videos with the category links.

    If yes, It shows that you need to use the “Badge” option to show the custom taxonomies as per their documentation here https://elementor.com/help/posts-widget-pro/

    The custom taxonomy name used by our plugin for categories is “Video Categories (aiovg_categories)”.

    Please correct me If I have misunderstood your question.

    Also, sorry that I don’t know that much about the usage of Elementor’s “Posts widget”, and their support may be the better location to ask this.

    Hi

    I tried to show videos using elementor posts widgets actually it works (terms > videos) but for some reason it shows only titles & links to the videos, but not the videos screenshots

    i think it is because it’s looking for the featured image, so it would work if all videos have featured images

    Plugin Contributor wpvideogallery

    (@wpvideogallery)

    @deepblue5,

    Luckily, our last 2.6.3 version has support for Featured Images.

    Kindly go to the “Video Gallery => Settings” menu from your WordPress Admin Dashboard, click on the “Featured Images” submenu and enable the “Featured Images” feature.

    Then, edit and open your videos under the “Video Gallery => All Videos” menu and simply click the “Publish” button. Now, our plugin would auto-generate a featured image for your videos if already an image file is uploaded.

    Alternatively, you can also upload a “Featured Image” using the concerned meta box.

    Great news thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Video Category with search’ is closed to new replies.