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
<?php | |
$default_attr = array( | |
'alt' => 'photo' | |
); | |
$images =& get_children( array ( | |
'post_parent' => $post->ID, | |
'post_type' => 'attachment', | |
'post_mime_type' => 'image' | |
)); | |
$pics = get_first_image(); |
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
It's not simply the strength of the magnetic field that matters, so much as the rate at which the field changes. | |
If you go from strong field to no field very quickly or vice versa, then the change in magnetic | |
flux can generate small voltages over wires, traces, etc. If the voltages are high enough, then they can cause damage |
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
<?php | |
//list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin) | |
$taxonomy = 'surgery_type'; | |
$orderby = 'name'; | |
$show_count = 0; // 1 for yes, 0 for no | |
$pad_counts = 0; // 1 for yes, 0 for no | |
$hierarchical = 1; // 1 for yes, 0 for no | |
$title = ''; |
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
<?php | |
echo ' . $myvar. </br>'; | |
echo ' </br>'; | |
echo ' </br>'; | |
echo ' . $myvar2. </br>'; | |
?> | |
but I need to use it like this: |
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
$params = array( | |
'orderby' => 't.menu_order ASC', | |
'limit' => 4, | |
); | |
$restaurants = pods( 'restaurant', $params ); | |
while ( $restaurants->fetch() ) : | |
$name= $restaurants->field('name'); | |
$permalink= $restaurants->field('permalink'); | |
$blurb = $restaurants->field('blurb'); | |
//all my html for the detail info here |
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
//here it returns NULL | |
global $wp_query, $wp_registered_sidebars, $wp_registered_widgets; | |
var_dump ($wp_registered_sidebars); | |
$sidebar_contents = ""; | |
ob_start(); | |
dynamic_sidebar('top-util'); | |
$sidebar_contents = ob_get_contents(); | |
ob_end_clean(); | |
return $sidebar_contents; |
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
object(WP_Query)#364 (49) { ["query"]=> NULL ["query_vars"]=> array(0) { } ["tax_query"]=> NULL ["meta_query"]=> bool(false) ["queried_object"]=> NULL ["queried_object_id"]=> NULL ["request"]=> NULL ["posts"]=> NULL ["post_count"]=> int(0) ["current_post"]=> int(-1) ["in_the_loop"]=> bool(false) ["post"]=> NULL ["comments"]=> NULL ["comment_count"]=> int(0) ["current_comment"]=> int(-1) ["comment"]=> NULL ["found_posts"]=> int(0) ["max_num_pages"]=> int(0) ["max_num_comment_pages"]=> int(0) ["is_single"]=> bool(false) ["is_preview"]=> bool(false) ["is_page"]=> bool(false) ["is_archive"]=> bool(false) ["is_date"]=> bool(false) ["is_year"]=> bool(false) ["is_month"]=> bool(false) ["is_day"]=> bool(false) ["is_time"]=> bool(false) ["is_author"]=> bool(false) ["is_category"]=> bool(false) ["is_tag"]=> bool(false) ["is_tax"]=> bool(false) ["is_search"]=> bool(false) ["is_feed"]=> bool(false) ["is_comment_feed"]=> bool(false) ["is_trackback"]=> bool(false) ["is_home"]=> bool(false) ["is_404"]=> bool(false) ["is_com |
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
// Include WP | |
define('WP_USE_THEMES', false); | |
in | |
// actually contains what you would expect | |
var_dump($wp_query); | |
//set it as a global (get same error with or without this set) | |
global $wp_query; | |
class WordpressHeader extends Module | |
{ |
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
include_once('/home/bscdevel/public_html/wirerackblog/wp-load.php'); | |
// returns https://gist.github.com/Lindsayanng/5640605 | |
var_dump($wp_query); | |
class WordpressHeader extends Module | |
{ | |
public function hookDisplayHeader(){ | |
if( !defined( 'WP_USE_THEMES' ) ) |
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
variable return from outside of class | |
object(WP_Query)#364 (49) { ["query"]=> NULL ["query_vars"]=> array(0) { } ["tax_query"]=> NULL ["meta_query"]=> bool(false) ["queried_object"]=> NULL ["queried_object_id"]=> NULL ["request"]=> NULL ["posts"]=> NULL ["post_count"]=> int(0) ["current_post"]=> int(-1) ["in_the_loop"]=> bool(false) ["post"]=> NULL ["comments"]=> NULL ["comment_count"]=> int(0) ["current_comment"]=> int(-1) ["comment"]=> NULL ["found_posts"]=> int(0) ["max_num_pages"]=> int(0) ["max_num_comment_pages"]=> int(0) ["is_single"]=> bool(false) ["is_preview"]=> bool(false) ["is_page"]=> bool(false) ["is_archive"]=> bool(false) ["is_date"]=> bool(false) ["is_year"]=> bool(false) ["is_month"]=> bool(false) ["is_day"]=> bool(false) ["is_time"]=> bool(false) ["is_author"]=> bool(false) ["is_category"]=> bool(false) ["is_tag"]=> bool(false) ["is_tax"]=> bool(false) ["is_search"]=> bool(false) ["is_feed"]=> bool(false) ["is_comment_feed"]=> bool(false) ["is_trackback"]=> bool(false) ["is_home"]=> bool(fa |