[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oiksc_404_handler::handle_post_type() – Generic post type 404 handler

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

string

Source

File name: oik-shortcodes/classes/class-oiksc-404-handler.php
Lines:
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

Published: March 11, 2017 | Last updated: March 11, 2017

Information

Function name: oiksc_404_handler::handle_post_type
Class ref: oiksc_404_handler
Plugin ref: oik block shortcode and API server
Version: 1.41.1
Sourcefile: classes/class-oiksc-404-handler.php
File ref: classes/class-oiksc-404-handler.php
Deprecated?: No
API Letters: #,H,O,P

Recent plugin updates

oik v4.7.2 oik v4.7.2 includes a fix to the logic to render blocks for Content and Excerpts in the bw_pages shortcode. ...
oik v4.7.1 Upgrade to oik v4.7.1 for bw_pages rendering blocks for Content and Excerpts, and support for post_name attribute for shortcode which query posts ...
oik-shortcodes v1.41.1 Upgrade to oik-shortcodes v1.41.1 for a couple of minor changes. ...
oik-bob-bing-wide v2.2.2 Upgrade to oik-bob-bing-wide v2.2.2 for improvements to bw_dash examples and fixes to some SVG icon's visibility. ...
oik-bwtrace v3.3.1 Upgrade to oik-bwtrace v3.3.1 to measure plugin load times and ad hoc action timing points. ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: [email protected]

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2022. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.0.1. PHP: 7.4.30. Memory limit: 768M