'WidgetKit: How to make print statements appear in the console?
I am trying to find out why my Widget does not reload.
I want to print entries array from inside func getTimeline to the console.
However the print statements do not appear in the console.
How to make print statements appear in the console?
Solution 1:[1]
SOLUTION 1
If your contact.php page does not make any HTTP GET requests, try using $_SERVER['REQUEST_URI'] instead of basename($template)
if($_SERVER['REQUEST_URI'] == "contact.php"):
remove_action("init","hide_editor_page",10);
endif;
SOLUTION 2
If example.com/whatever/ is your URL, it will return whatever in $current_slug
global $wp;
$current_slug = add_query_arg( array(), $wp->request );
if($current_slug == "contact.php"):
remove_action("init","hide_editor_page",10);
endif;
Let me know if it works!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ankesh Anand |
