WordPress.org

Ready to get started?Download WordPress

Forums

Media Category Library
Search form in a widget? (3 posts)

  1. martinbeasnunez
    Member
    Posted 1 year ago #

    is possible to place the form in a widget?

    with a shortcode or code in the sidebar.php?

    http://wordpress.org/extend/plugins/media-category-library/

  2. martinbeasnunez
    Member
    Posted 1 year ago #

    try adding this to the sidebar.php but did not work:

    <form id="mediacat-library-search-form" action="<?php echo get_site_url(); ?>/<?php if ( get_option( 'permalink_structure' ) ): ?><?php echo $this->settings_data['rewrite_url']; ?><?php else: ?>?mediacat_library=1<?php endif; ?>" method="post">
    	                    <div>
    				<select name="media-categories[]" id="media-categories[]">
                                    <option value="<?php echo $slug; ?>">-- <?php _e( 'All', self::nspace ); ?> --</option>
    <?php foreach ( $this->get_media_categories() as $slug => $name ): ?>
                                    <option value="<?php echo $slug; ?>"<?php if ( $slug == $_REQUEST['cat'] ): ?> selected<?php endif; ?>><?php echo $name; ?></option>
    <?php endforeach; ?>
                            	</select>
    
                            <input type="hidden" name="mediacat_library_submit" value="1">
    	                	<input type="submit" value="<?php _e( 'Search', self::nspace ); ?>">
                            </div>
    
    	        </form>
    			<?php// if ( $_REQUEST['keyword'] || $_REQUEST['media-categories'] ) $this->mediacat_library( true ); ?>
  3. martinbeasnunez
    Member
    Posted 1 year ago #

    ?

    :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.