echo do_shortcode is not working on theme’s template

According to the developer of the jwPlayer it was necessary to implement the plugin as a filter to be able to support ‘.’ in tag attributes. Hence do_shortcode(..) does not work but jwplayer_tag_callback(..) will return the desired result. Matching your example simply execute: echo jwplayer_tag_callback(‘[jwplayer config=”Out-of-the-Box” file=”‘ . $urlbox[0] . ‘” image=”http://www.mywebsite.com/myimage.jpg”]’);

Gallery Only Displaying One Thumbnail

Try this and verify that the attachments come back correctly when queried directly: // helper function to return first regex match function get_match( $regex, $content ) { preg_match($regex, $content, $matches); return $matches[1]; } // Extract the shortcode arguments from the $post $shortcode_args = shortcode_parse_atts(get_match(‘/\[gallery\s(.*)\]/isU’, $post->post_content)); // get the attachments specified in the “ids” shortcode argument … Read more

add_sub_menu page() to be replaced by add_theme_page()

Themes are required to use add_theme_page() in the WordPress Theme Directory. You need: add_theme_page( $this->strings[‘page_title’], // Page title $this->strings[‘menu_title’], // Menu title ‘edit_theme_options’, // Capability $this->menu, // Menu slug array( &$this, ‘install_plugins_page’ ) // Callback ); s add_theme_page(theme_name.’ Settings’, theme_name ,’install_themes’, ‘panel’ , ‘panel_options’); $theme_page = add_theme_page(‘Settings’, theme_name.’ Settings’,’install_themes’, ‘panel’ , ‘panel_options’); add_theme_page(theme_name.’ Documentation’, ‘Documentation’,’install_themes’, … Read more

Dashboard Whitescreen of Death?

You have active a plugin or theme, that include scripts or styles via function wp_enqueue_style and wp_enqueue_script. Since version 3.3 is it not possible to enqueue script and styles without a hook. Find the source and fix this, is easy to do that. The codex have for this topic a fine documentation. /** * Proper … Read more

How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?

As you are using PHP 5.5+ versions, the old PHP 4 things will throw errors … of course. The error comes from – as you can read – the WordPress importer plugin, which is some kind of badly treated step child of WordPress. plugins/wordpress-importer/wordpress-importer.php:38 One solution is to use our fork with fixes from wecodemore/GitHub, where you can … Read more

Add error message on password protected pages

Here’s a combination of these two great answers (21697 & 71284) to similar questions. wpse241424_check_post_pass() runs early on the wp hook on single password protected pages. If an invalid password is entered, the INVALID_POST_PASS constant is set for use later in the form, and the password entry error cookie is removed to prevent the error … Read more

After upgrading to PHP 7.0 my contact form outputs error

WordPress has a built in function for validating emails and I would advise you use that. So you can replace your preg_match with the wordpress is_email else if (!preg_match(“/^[A-Z0-9.%-]+@[A-Z0-9.%-]+.[A-Z]{2,4}$/”, trim($_POST[’email’]))) { $emailError=”You entered an invalid email address.”; $hasError = true; } REPLACED WITH else if ( ! is_email( trim( $_POST[’email’] ) ) ) { $emailError=”You … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)