开发者 | valendesigns |
---|---|
更新时间 | 2011年3月31日 05:46 |
捐献地址: | 去捐款 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 3.1 |
<?php if ( function_exists( 'envato_marketplace_search' ) ) { envato_marketplace_search(); } ?>
. The function takes in 8 optional arguments ( limit, site, type, query, referral, search, cache, & echo ). Query is automatically built using the get_search_query()
function but you could pass in your own query if you really felt the need. Search defaults to true and means that you want results only on search pages (advanced use for those who understand the application). Cache is for situations where you plan on setting the query manually and want to limit the API calls. Use cache with CAUTION, each query will be cached in your database if set to true (default is false). Below are examples of how you would use the plugin to return search results.
These two are equivalent to each other:
envato_marketplace_search( 'limit=2&site=themeforest&type=site-template&referral=valendesigns' );
envato_marketplace_search( array( 'limit' => 2, 'site' => 'themeforest', 'type' => 'site-template', 'referral' => 'valendesigns' ) );
envato-marketplace-search
folder to the /wp-content/plugins/
directory<?php if ( function_exists( 'envato_marketplace_search' ) ) { envato_marketplace_search(); } ?>
in your themes (search.php).