Fatal error: Call to undefined function register_new_user()

I greped a 3.6 install and got this: ./wp-login.php:321:function register_new_user( $user_login, $user_email ) { ./wp-login.php:550: $errors = register_new_user($user_login, $user_email); Notice the function definition is in wp-login.php. If you look at the current wp-login.php, it isn’t there anymore and there is a note at the top of the page, just above the code: Last change on … Read more

Hide image if taxonomy term is empty

Instead of write manually the html code for your flags, you should create it using php and wordpress functions: $countries = get_terms(‘country’, array(‘hide_empty’ => true) ); $exclude_terms = array(‘featured’); if ( ! empty($countries) && is_array($countries) ) { ?> <img class=”mapAdjust” src=”https://wordpress.stackexchange.com/questions/114245/<?php bloginfo(“template_url’); ?>/img/map-adjust.gif” /> <img class=”map” src=”https://wordpress.stackexchange.com/questions/114245/<?php bloginfo(“template_url’); ?>/img/map.jpg” /> <?php foreach ( $countries as … Read more

2nd page displaying the exact same posts as my first page (minus the very first post)

Solution 1 It looks like this might be what is happening to your template: http://codex.wordpress.org/Pagination#Adding_the_.22paged.22_parameter_to_a_query Basically what it’s saying is that the second page doesn’t realize it’s the second page because the “paged” parameter is missing. I’ve just copied directly from the wordpress documentation, which says you should do this: <?php $paged = (get_query_var(‘paged’)) ? … Read more

Metabox Not saving data

I optimized your function. <?php function dd_hctb_create() { add_meta_box (‘dd_meta’, ‘Heading Content Text Box’, ‘dd_hctb_cb’, ‘page’, ‘normal’, ‘high’); } // function dd_hctb_create add_action(‘add_meta_boxes’, ‘dd_hctb_create’); function dd_hctb_cb($post) { wp_nonce_field(basename(__FILE__), ‘dd_mbe_content_nonce’); //retrieve the metadata values if they exist $value = get_post_meta($post->ID, ‘dd_mbe_content’, true); ?> <p> Write any content in here that you want to appear above the … Read more

How to solve Woocommerce Memory Limit

You could also try toying with the max memory limit. I think it’s far more likely you are on an EIG host and throttled to a 64mb limit. Oh one more thing, it’s define( ‘WP_MEMORY_LIMIT’, ‘128M’ );

How can i force wp-admin to use 2-column dashboard layout? [closed]

This should help: function so_screen_layout_columns( $columns ) { $columns[‘dashboard’] = 2; return $columns; } add_filter( ‘screen_layout_columns’, ‘so_screen_layout_columns’ ); function so_screen_layout_dashboard() { return 2; } add_filter( ‘get_user_option_screen_layout_dashboard’, ‘so_screen_layout_dashboard’ ); On dashboard screen options it will show 1 or 2 columns, after clicking 1 column after refresh will still be 2 columns. You can change to whatever … Read more

Is This Code Efficient – Or is there a better way?

I’d recommend caching – generating the HTML mark-up and storing that in a cache, and using that rather then generating the list on each page load. Of course, the cache would have to cleared if a recipe is ever added, removed or changes title. add_shortcode(‘recipe_list’, ‘recipe_query’); function recipe_query( $atts, $content ){ //Get mark-up from cache … Read more

Custom ajax call returns 0 [duplicate]

Modify your registerform() function to include die() after you echo your response. Example: function registerform(){ echo $_POST[‘name’]; die(); } add_action(‘wp_ajax_registerform’, ‘registerform’); add_action(‘wp_ajax_nopriv_registerform’, ‘registerform’);