This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="entry"> | |
<!--If no results are found--> | |
<h1><?php esc_html_e('Oops!','Nimble'); ?></h1> | |
<h3 style="margin-bottom:3em">The page you requested, <em style="color:#00539f">'<?php echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ; ?>'</em> could not be found. </h3> | |
<p>Choose a search option below or use the navigation above to locate your software.</p> | |
<?php get_search_form(); | |
/** | |
* Enhance 404 Error Page | |
* http://codemug.com/php/enhance-404-error-page-make-it-powerful/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* How to create an advanced search form for wordpress | |
* http://fearlessflyer.com/how-to-create-an-advanced-search-form-for-wordpress/ | |
*/ | |
function buildSelect($tax){ | |
$terms = get_terms($tax); | |
//$tax = preg_replace('/^software_/', '', $tax); | |
//$tax_name = str_replace('_', ' ', $tax_name); | |
$prefix = 'software_'; | |
$tax_name = preg_replace('/^' . preg_quote($prefix, '/') . '/', '', $tax); //preg_replace('/^software_/', '', $tax); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a Custom Column in Posts and Custom Post Types Admin Screen | |
* http://code.tutsplus.com/articles/add-a-custom-column-in-posts-and-custom-post-types-admin-screen--wp-24934 | |
*/ | |
/** | |
* Custom Post Type Snippets to make you smile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE some_table SET some_field = REPLACE(columnName, 'test', 'sample') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE table_name DROP column_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* If Url contains | |
* https://www.drupal.org/node/1214104 | |
*/ | |
$path = $_SERVER['REQUEST_URI']; | |
$find = 'design'; | |
$pos = strpos(SERVICES_CONTAIN, $find); | |
if ($pos !== FALSE){ | |
echo "current page: " . $find; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$string = <<<EOHTML | |
<section id="anniversary_mobile" class="row"> | |
<div class="four columns"> | |
<figure> | |
<img class="head hires" src="%s15-years-15mobile.png" width="246" height="185" alt="Celebrating 15 years of blowing customers minds"> | |
</figure> | |
</div> | |
</section> | |
EOHTML; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Move JS to Bottom of Footer | |
* http://www.wpbeginner.com/wp-tutorials/how-to-move-javascripts-to-the-bottom-or-footer-in-wordpress/ | |
*/ | |
/* | |
* Use wp_localize_script to load php into js | |
* https://pippinsplugins.com/use-wp_localize_script-it-is-awesome/ | |
*/ |