
如何在WordPress中实现按类别搜索
the_generator ( $type )
the_generator – 这个函数用来输出当前安装的WordPress软件的版本号。它通常用在WordPress主题的头部部分。
显示RSS、ATOM等的生成器XML或Comment。
为请求的输出格式返回正确的生成器类型。允许一个插件在整体上过滤生成器{@see ‘the_generator’}过滤器。
function the_generator( $type ) { /** * Filters the output of the XHTML generator tag for display. * * @since 2.5.0 * * @param string $generator_type The generator output. * @param string $type The type of generator to output. Accepts 'html', * 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'. */ echo apply_filters( 'the_generator', get_the_generator( $type ), $type ) . "n"; }