Update Content based on expiration time or queued processing

Few things come to my mind, which could help. Post status Perhaps you could use the pending post status, which you would use as a parameter in aggiorna_dati(), for the auto-generated posts that needs to be processed by funzione_recensione(). After the function is done it would change the status to something else. $args[‘post_status’] = ‘pending’; … Read more

echo get_post_meta()

Remove the echo. In PHP, you only use echo when you want to send the result as text to the browser. If you want to use the value in PHP (like you are trying to do), then you leave out the echo and add $post->ID, ‘meta_field_you_want’, true to get_post_meta();

trying to use wp_handle_upload with ajax

You need to include a few files to get wp_handle_upload to work, and i have a function just for that : function My_wp_handle_upload($file_handler,$overrides) { // check to make sure its a successful upload if ($_FILES[$file_handler][‘error’] !== UPLOAD_ERR_OK) __return_false(); require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/media.php’); $upload = … Read more

Custom excerpt function re-factoring

I’d simply set a flag as second input argument for the function: function new_wp_trim_excerpt( $text, $case=”plain” ) { switch ( $case ) { default : case ‘plain’ : // do stuff – your function so far break; case ‘image’ : break; } } Notes: Avoid names like class=”moarplz”. It’s hard to read for others and … Read more

May i Use ShortCode in Template?

Have you tried using the do_shortcode() function? EDIT I’m not familiar with the TweetMeme shortcode, but here’s an example usage for putting a NextGen Gallery directly into a template file: echo do_shortcode( ‘[slideshow id=”1″ w=”603″ h=”270″]’ ); Simply replace with the appropriate shortcode (and parameters) for TweetMeme. Codex ref: do_shortcode() EDIT 2 With TweetMeme, you … Read more

Using “Read More” link with custom excerpt

This should remove the <p> tags, but leave the styling by replacing the paragraph tag with a <span> class: function all_excerpts_get_more_link($post_excerpt) { return ” . $post_excerpt . ” . ‘<span class=”readmore”><a href=”‘. get_permalink($post->ID) . ‘”>’ . ‘Continue Reading &raquo’ . ‘</span>’; } add_filter(‘wp_trim_excerpt’, ‘all_excerpts_get_more_link’);