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)
The filtering can be done with this function totally untested function filter_custom_fields($key=”, $terms=””, $tax=”, $selkey=”, $selval=””) { global $wpdb; $include=””; if ( $selkey && $selval && ( is_string($selval) || is_array($selval) ) ) { $include = ” AND post_id IN (” . $wpdb->prepare(“SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value “, $selkey ); … Read more
Filters are WordPress not PHP. Second, you have called the thumbnail_filter function. You hooked it to post_thumbnail_html so any time a function runs that applies that filter, like the_post_thumbnail, your function runs. If you think about that, you will see that you have a bit of a Loop there. The filter calls a function (twice) … Read more
In a comment you clarify: what i meant by running is going to the url (mysite.com/wp-content/plugins/myplugin/checkrank.php?id=1) In that case, you are running a standalone file. Yes, one that resides inside WordPress’ plugins folder, but you don’t access it in the context of WordPress (i.e. from within it). Here, none of the WordPress core functions/methods/classes will … Read more
Change your query from: SELECT COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url FROM ‘.$wpdb->comments.’ WHERE comment_author_email != “” AND comment_type = “” AND comment_approved = 1 GROUP BY comment_author_email ORDER BY comments_count DESC, comment_author ASC LIMIT ‘.$amount To: SELECT *, COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url FROM ‘.$wpdb->comments.’ WHERE comment_author_email != “” AND comment_type = “” … Read more
If the ‘slideshow’ key is normally supposed to contain a string value, but you want to give it an empty value, then give it the empty string. The empty string is still a string data type, so it is more likely to react the way you expect in a string function. The null value is … 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 are using paths relative to the current directory. Try this (untested) echo “$i. <option value=”” . home_url(“/groundfish-meetings/’ . $file) . “‘>$file</option>”;
With WordPress.com you can edit a theme’s CSS styles*, fonts*, or other display options offered under the theme’s Appearance->Customize menu. You do not have access to edit any of the theme’s php or template files. **notes premium feature
That menu is rendered by a function called _wp_menu_output in menu-header.php and I don’t see a hook that will let you alter the HTML for those links, which is what you’d need to do– ie. <a target=”_blank” … That being as it is you will probably need to do this with Javascript either by rewriting … Read more