You appear to be a bot. Output may be restricted
Description
Generic post type 404 handler
Usage
$string = oiksc_404_handler::handle_post_type( $text );
Parameters
- $text
- ( string ) required –
Returns
stringSource
File name: oik-shortcodes/classes/class-oiksc-404-handler.phpLines:
1 to 22 of 22
function handle_post_type( $text ) { $name = bw_array_get( $this->query->query, "name", null ); $name = substr( $name, 0, 1 ); $like = $name; oik_require( "shortcodes/oik-navi.php" ); oik_require( "includes/bw_posts.php" ); $atts = array( "post_type" => $this->post_type_object->name , "orderby" => 'title' , "numberposts" => 10 , "name" => $name ); $posts = bw_get_posts( $atts ); if ( $posts ) { $text = "We couldn't find exactly what you were looking for. Here are some similar." ; $text .= bw_navi( $atts ); } else { $text = "We couldn't find exactly what you were looking for. Perhaps it's in this list." ; unset( $atts['meta_key'] ); $text .= bw_navi( $atts ); } return( $text ); }View on GitHub