Adding a slider captcha to the comment system

First things first, there is quite a bit of _doing_it_wrong() in the script enqueueing. Don’t override core-bundled scripts Try removing this hook callback, and see if that fixes things: function my_scripts_method() { wp_deregister_script( ‘jquery’ ); wp_deregister_script( ‘jquery ui’ ); wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js’); wp_register_script( ‘jquery ui’, ‘https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js’); wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘jquery ui’ ); } add_action(‘wp_enqueue_scripts’, … Read more

Send email on Job Dispatched from WP e-commerce [closed]

I’d suggest you start by looking at action ‘wpsc_purchase_log_update’, which is triggered in wpsc-includes/purchase-log.class.php and passes the wpsc_purchase_log object. Test the $previous_status member of that object, and the new status value (might be in data member as $data[‘statusno’]) == WPSC_Purchase_Log::JOB_DISPATCHED. Something like this (untested): add_action(‘wpsc_purchase_log_update’, ‘wpse_73707_wpscPurchaseLogUpdate’); /** * trigger event or option to the “Job … Read more

PHP WordPress optimization my loop code

Hi there is not better option, but to speed it up little you can use wordpress transient, see documentation: http://codex.wordpress.org/Transients_API your code would look like this (and i cleaned it bit and used function empty to check array…): <?php if ( false === ( $tag_descrip = get_transient( ‘tag_descrip’ ) ) ) { $tag_descrip = get_terms( … Read more

How to display posts by current user in a drop down

Use ‘author’ => get_current_user_id() as an argument for get_posts(). This will restrict the found posts to these of the user which is currently logged in. The best reference for the available parameters is still WP_Query::parse_query() in wp-includes/query.php. It is not exactly an atomic function, but you can find parameters not documented elsewhere – like this … Read more

How to Sort posts by Vote Count?

Simply wrap the hooks in a conditional check something like: if (is_home() || is_front_page()){ add_filter(‘posts_orderby’, ‘edit_posts_orderby’); add_filter(‘posts_join_paged’,’edit_posts_join_paged’); } and leave the rest as is.

WordPress Theme Options Values

Your input and textarea have the same name and id, so when the data is processed, it’s only going to recognise one (probably the last). Try using different name and id properties, and you should be able to differentiate between the 2.

Dynamic Sidebars & Echo

You don’t need to echo dynamic_sidebar(). End your echo, call dynamic_sidebar(), and then start a new echo. To make it easier, just close/reopen your PHP tags: <?php if( fake if code ) { if( another fake if code ) { ?> <div class=”sidebar sidebar-first”> <ul class=”widget-area first”> <?php dynamic_sidebar( ‘pop-news-sidebar’ ); ?> </ul> </div> <?php … Read more

Trying to get property of non-object “ wordpress ”

It looks like the $args passed to the function is not an object for some reason. I can’t see the origin of this problem but for a quick solution, you can add $args = (object) $args; before the first time you use $args, here on line 44 Also, as commented by toscho, dropdown_menu() is not … Read more