Php conditional help needed

This post is related to php so you should post it in stackoverflow but as you are a new user .i would help you <?php if (is_author(‘2’) && (is_single()) ) { ?> <link rel=”author” href=”https://plus.google.com/**********”/> <?php } ?>

Trying to exclude posts from a category on the home page

Technically, pre_get_posts is an action, not a filter, and you don’t need to return anything and $query is passed in by reference, but that code should nonetheless work. Cleaned up it would be: function excludeCat($query) { if ( $query->is_home ) { $catid = get_cat_ID(‘watch-isatv’); $query->set(‘cat’, ‘-‘.$catid); } } add_action(‘pre_get_posts’, ‘excludeCat’); There are several potential points … Read more

Help with my first Metabox helper class

The problem seems on the line no 279 of metabox class api definition, below is your code: ‘<img src=”‘.$label.'” class=”optionimg ‘.$selected_value.'” onclick=”document.getElementById(\ ”.$field[‘id’].$choices.’\’).checked=true” style=”display:inline-block;” /><input type=”radio” name=”%s” id=”%s” value=”%s” style=”display:none;”/>’, $choices is not defined variable in the scope (error thrown by WAMP), I think you should replace $field[‘id’].$choices with $value as in below code: ‘<img … Read more