Tag Info

Hot answers tagged

6

The first location where PHP would look for relative path will not be the file you specify include in, but relative to point of entry file (index.php or whatever). Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in the include_path, include will finally check in the calling ...


4

You need to listen for the click event (there is no such thing as a pre/before click) and do some work right then or figure out if you want to allow the click to "go through" or not based on some validation for example. jQuery(function($) { // We are binding to the body so that the code // will work for future elements added to the DOM ...


3

The error isn't actually caused by your PHP version (PHP 4 constructors won't be removed until PHP 7) - it's a warning produced by WordPress in preparation for this. Each repetition of the error represents a plugin using the outdated code. Until your plugins' authors update them, you can run the following shell command on a Linux system to find the old ...


1

There are 2 problems here ( and a third unrelated problem ) Problem 1 You're calling register_widgetArea, a function that doesn't exist. Instead, you want to register a sidebar. If no sidebars are registered, the widgets menu does not appear in the admin area. Instead, use register_sidebar to register your sidebar. I would expect calling ...


1

This is a bug in WordPress 4.3. The authors have made the necessary revisions to core and it will be fixed in WordPress 4.3.1. In the meantime, you can patch your version of WordPress. The details are here: https://core.trac.wordpress.org/ticket/33442


1

See the WordPress Codex page on Widgets API and utilize the update() function in your widget class declaration as used here and add a script call in the appropriate place: /** * Processing widget options on save * * @param array $new_instance The new options * @param array $old_instance The previous options */ public function update( $new_instance, ...


1

The problem is your update function. $old_instance is kind of special variable. The simplest is function update($new_instance, $old_instance) { return $new_instance; } For the safe function update($new_instance, $old_instance) { $instance = array(); $instance['name'] = htmlentities($new_instance['name']); ...


1

Looks like they are hard-coded into the sidebar. So you could manually remove them, but they'll just return when you update the theme. Best solution would be to make a child theme, if possible, and create a new sidebar without the unwanted widgets. EDIT: Remove <aside id="archives" class="widget"> <h1 class="widget-title"><?php ...



Only top voted, non community-wiki answers of a minimum length are eligible