How to turn off email you receive when registered?

The function that generates the new user notification is wp_new_user_notification(). It is called by another (similarly named) function wp_new_user_notifications() which is triggered by the action hook register_new_user in the register_new_user() function. If you follow that (or even if you don’t), all you need to do is remove the wp_new_user_notifications() filter from the register_new_user action: add_action( … Read more

How to configure self hosted wordpress so that everything can be upgraded/installed from dashboard

This is an issue with your server configuration, not with WordPress. Generally, it means that the server is not configured to use suPHP. (More, via Otto, here and here.) The (usually simple) solution is to add your FTP information to wp-config.php: define(‘FTP_USER’, ‘username’); define(‘FTP_PASS’, ‘password’); define(‘FTP_HOST’, ‘ftp.example.org’); Put these in wp-config.php (with your specific information, … Read more

Getting movie and serial on actor page

Hy, i resolve a problem, a liitle question, how can i get the text if nothing is selected in custom field ( distributie_serial). Ex: no serial for this actor. This is the Code that works. <?php $seriale = get_posts(array(‘post_type’ => ‘serial’, ‘meta_query’ => array( array(‘key’ => ‘distributie_serial’, // name of custom field ‘value’ => ‘”‘ … Read more

On this day PHP code

Adapted from the Codex, tweaking WP_Query to get all years before this. Untested, but should work. $on_this_day = array( // remove the year from the first query array ‘monthnum’ => date(‘n’), ‘day’ => date(‘j’); ); // Create a new filtering function that will add our where clause to the query function filter_where( $where=”” ) { … Read more

How to stop loading multiple copies of jquery

You should remove these lines from your header.php <script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/154191/<?php bloginfo(“template_url’); ?>/javascripts/jquery.js”></script> <script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/154191/<?php bloginfo(“template_url’); ?>/javascripts/tabber.js”></script> <script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/154191/<?php bloginfo(“template_url’); ?>/javascripts/superfish.js”></script> And instead add the following function in your functions php… right at the top. wp_enqueue_script function sg_theme_js(){ wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘tabberjs’, get_template_directory_uri().’/javascripts/tabber.js’, array(‘jquery’), 1.0, true); wp_enqueue_script( ‘superfishjs’, get_template_directory_uri().’/javascripts/superfish.js’, … Read more

Why does this echo values in the wrong order?

As most template tags that start with the_ this one echoes time and not returns it (which template tags that start with get_the_ do). First the_time() fires and echoes year, then its return (null) gets concatenated and echoed with string. So: echo ‘Archive for ‘; the_time(‘Y’); Or: echo ‘Archive for ‘ . get_the_time(‘Y’);

Replacing mysql_real_escape_string in WordPress theme

As mysql_real_escape_string() was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0, you can try esc_sql() to work for later WP/PHP versions. Replace mysql_real_escape_string() with esc_sql() at line 111 & 118 in your admin-interface.php file. Hope this should work well for you!

Getting the Current User

Call the function get_currentuserinfo() on the next line after declaring the global variable $current_user What is the difference between wp_get_current_user() and get_currentuserinfo()? Below is a snippet: function wp_get_current_user() { global $current_user; get_currentuserinfo(); return $current_user; } I think the source code answers your first two questions, right? Remember that wp_get_current_user() is defined in wp-includes/pluggable.php so it … Read more