call a string/function from database
Maybe like this get_option( “mese_giambellino” ); This retrieves what you saved with update_option() More about WP options you can read here (http://codex.wordpress.org/Options_API)
Maybe like this get_option( “mese_giambellino” ); This retrieves what you saved with update_option() More about WP options you can read here (http://codex.wordpress.org/Options_API)
Generally it’s not a common way to strip wpautop with remove_filter as it is native functionality of WordPress. But if you want to : place the remove_filter() function right before the the_content() function on the pages/templates where you don’t need the wpautop <?php remove_filter( ‘the_content’, ‘wpautop’ ); the_content();?>
Last action you can do… add_action(‘shutdown’, ‘before_the_end_of_world’); function before_the_end_of_world() { die(‘I will miss you, wordpress’); }
Try changing wp-head to wp_head – add_action(‘wp_head’, ‘dsgn_css_customizer’);
The implementation can be purely CSS, and depends on your specific HTML markup. However, the class you’ll need to target is supplied by the post_class() template tag. Let’s say you have something like the following, basic markup: <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <div class=”post-title”> <img … /> <h1><?php the_title(); ?></h1> </div> <!– Etc. … Read more
$whitelist = array(‘127.0.0.1’); if(!in_array($_SERVER[‘REMOTE_ADDR’], $whitelist)){ // not valid } For more info on how it works. https://stackoverflow.com/questions/1634782/what-is-the-most-accurate-way-to-retrieve-a-users-correct-ip-address-in-php
You would replace this: $dataOrig = file_get_contents(‘http://twitter.com/users/show/’.$twitter_user); if (is_wp_error($dataOrig)) { return ‘Error!!!’; }else{ $profile = new SimpleXMLElement ( $dataOrig ); $countOrig = $profile->followers_count; $count = strval ( $countOrig ); } With this: $dataOrig = wp_remote_get(‘http://twitter.com/users/show/’.$twitter_user); if (is_wp_error($dataOrig)) { return ‘Error!!!’; } else { $profile = new SimpleXMLElement ( $dataOrig[‘body’] ); $countOrig = $profile->followers_count; $count = … Read more
The function that handles thumbnail size is already hooked with after_setup_theme in \twentythirteen\functions.php. There is no use adding a if (!function_exists()) in child functions.php because the child functions.php is always loaded before. So this would be more logical to find this in the parent file. The answer would be to set a different prority to … Read more
You never initialize the value in $url. Test the value in $swapcategory. When there is no match, $url is empty and that may be the problem. This comment is false: // $url now contains our new success page. Let’s update the form setting. It should say: // $url may contain our new success page or … Read more
get_the_date depends on the global $post variable. It is a bit hard to tell that that is the case but if you look at the source for get_the_date you’ll see that it uses get_post and it assumes $post if no other parameters are given. Your code never sets that global $post variable except for when … Read more