Three variables on conditional tags

Your conditional, is_category() is wrong here. is_category() checks whether or not you are actually on a category page. By using the ! operator in conjuction with is_category() and ID 1293, this part of the condition will always return true except when you are actually on the category page for category 1293. If you need to … Read more

page single conditional

Your first code sample didn’t work because the elseif had no condition. elseif is a concatenation of else and if: if ( something ) { } elseif ( something else ) { } else { } Or <?php if ( something ): ?> <?php elseif ( something else ): ?> <?php else: ?> <?php endif; … Read more

Conditional menus based on page title

As you can read from the documentation register_nav_menu is used to register a menu in the menu editor. Your code will affect the backend only. Also you should pass a slug like string as the first parameter. If you want to change the display of the menu, you could simple write a condition which will … Read more

Multidimensional Array

The multidimensional array in this case is a multi-dimensional associative array, or a key-value pair. The key being ‘status’ and the value being your array of strings. In the conditional check you have attempted to access values by a numerical index, which in this case do not exist as nothing has been set to use … Read more

Display an image based on field value

How about this? <?php $meta = get_post_meta( get_the_ID(), ‘region’, true ); if ($meta == ‘NA’) { ?> <img src=”https://www.esrnetwork.com/wp-content/uploads/2016/12/NA.png” width=”25″ height=”25″/> <?php } elseif ($meta == ‘EU’) { ?> <img src=”https://www.esrnetwork.com/wp-content/uploads/2016/12/EU.png” width=”25″ height=”25″/> <?php } else { } ?>

How do I modify the ‘more’ link in a feed

These are some tricks: /* Modify the read more link on the_excerpt() */ function et_excerpt_length($length) { return 220; } add_filter(‘excerpt_length’, ‘et_excerpt_length’); /* Add a link to the end of our excerpt contained in a div for styling purposes and to break to a new line on the page.*/ function et_excerpt_more($more) { global $post; return ‘<div … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)