Call to a member function get_row() on a non-object, Unable to use global $wbdp inside a plugin

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

Comment_author_url doing nothing

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

How to set base url for php widget

You are using paths relative to the current directory. Try this (untested) echo “$i. <option value=”” . home_url(“/groundfish-meetings/’ . $file) . “‘>$file</option>”;

Admin Menu new tab external link

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

If no author posts, echo out some text

Maybe this do the trick, put your if statement inside the function to check if the number of posts retrieved is >= 1, if so begin the foreach else print a message function get_related_author_posts() { global $authordata, $post; $authors_posts = get_posts( array( ‘author’ => $authordata->ID, ‘post_type’ => ‘kenniscentrum’, ‘post__not_in’ => array( $post->ID ), ‘posts_per_page’ => … Read more

Using Custom Value Options in PHP

use get_post_meta($post->ID, ‘your key’, true); instead of get_meta(); compare values like $developing = get_post_meta($post->ID, ‘developing’, true); if ($developing == ‘value’) { // value is matched } elseif ($developing == ‘value2’) { // value 2 is matched } else { // not matched }