Track usernames with piwik [closed]
Track usernames with piwik [closed]
Track usernames with piwik [closed]
strtotime will return false if you give it weird information. echo strtotime(“<script>’); // bool(false) However, if you do what you are doing and nest two statement you may not get what you expect. echo strtotime(‘+1 day’,strtotime(‘<script>’)); // int(86400) And date returns the beginning of the universe, the day of creation– January 1, 1970– if given … Read more
From WordPress Codex: Function Reference/post type archive title This is optimized for archive.php and archive-{posttype}.php template files for displaying the title of the post type. “Title of post type” is the label, not the post type registered name. You can get the registered post type name using get_queried_object(); like this: <?php $obj = get_queried_object(); $post_type … Read more
You need to call global $variable; before you can use the variable. Try the code below instead for that line. // setup your global scope here global $icon_var; // set the new value in global scope $icon_var = get_post_meta($menu_item->ID, ‘_menu_item_custom’, true); // then use the variable $menu_list .= “\t\t\t\t\t<li><a href=\”$url\”>$icon_var<span>$title</span></a></li>\n”; DYNAMIC GLOBAL VARIABLE NAME If … Read more
Get custom post type’s fields in a while loop as variables
Convert your string of IDs into a proper array: $exclude_ids = get_field( ‘exclude_pages’ ); $exclude_array = explode( “,”, $exclude_ids ); Then pass $exclude_array as the value for post__not_in.
The way I’d do it is to not use global variables. This is a simple class that uses 3 methods and 1 property to hook into the_post and echo the post ID in the footer. /** * Plugin Name: WPSE_263293 Example */ class wpse_263293 { protected $ID; //* Add actions on init public function init() … Read more
Your own solution works I guess (double $$) but usually you do it this way: $quantity[‘type’] = 1; ${‘message’ . $quantity[‘type’]} = ‘hello’; echo $message1; // hello
Add comments for template variables
Show only one variaton in catalog on meta key