I am using in a wordpress theme, the Redux Framework, to manage the general options, and the ACF for additional options in the posts.
Both in the options panel and in the post fields, you have the option to disable and enable the name of the author of the post.
These are the variables and their values, which I call to show or not the name of the author
On the panel:
$opt_panel_author values: true / false
On custom fields
$opt_field_author values: inherit / yes / no
Calling on the theme like this:
<?php if ($opt_panel_author == true && $opt_field_author) { ?>
<span class = "post-meta-author"> By: John Doe </ span>
<?php } ?>
It works to some extent.
What I need now is:
1st - When the option in Panel is true and that of Custom Field isinherit show the author's name.
2nd - When the panel option is false and the Custom Field isyes show the author's name.
3rd - When the panel option is true and Custom Field isno do not show the author's name.
4rd - When the Options Panel and Custom Fields are disabled. Show the name of the author.
$opt_field_authoris a simple string scalar type? If so, you will need to test like this:<?php if ($opt_panel_author == true && $opt_field_author == 'yes') { ?>