Hello,
I need to conditionally display (in Template) a custom field "rename-author" to REPLACE "author-posts-link", in case that "rename-author" exists. It means that a (WordPress) user will able to rename the content's author - if needed. I am using Block editor.
Hi Shane,
sorry, the field's name is "Přejmenovat autora" with a "rename-author" slug - it is a part of "Photogallery fields" group, please see here hidden link .
OK, I understand the screen you sent (the beginning of declaring the post field), but I just don't know how to continue (how to use the conditional logic) to solve my problem.
Can you please send me a more descriptive screen or can you please look at my Template again?
Let me see how I can help with these 2 screenshots.
In screenshot 1 I'm comparing 2 fields, i'm comparing your "Přejmenovat autora" field to see if it is equal to the Post Title. What this will do is display the contents that are in the conditional block if the values are equal.
In screenshot 2 you will see me checking if the "Přejmenovat autora" field is empty and display the contents of the conditional block. To negate the empty statement so it displays when the field is NOT empty you will need to ensure that you've activated the NOT toggle.
Hi Shane,
OK, I am going to try it, but I still don't understand if these 2 screenshots are 2 different conditional fields or if they are somehow related (two conditions in one conditional field).
Again: It is always going to be some author visible.
For example, John Smith is the author of the post (John Smith is a registered WP user).
1. IF John Smith is not going to use "Přejmenovat autora" (rename-author) field to rename (himself) for another name, THEN the visible content's author will stay as John Smith.
2. IF John Smith is going to use "Přejmenovat autora" (rename author) field to rename (himself) for Dan Daniels, THEN the visible content's author is Dan Daniels. Dan Daniels doesn't have to be a registered WP user.
I hope that you understand my explanation.
Many thanks again.
Jiri
OK, I am going to try it, but I still don't understand if these 2 screenshots are 2 different conditional fields or if they are somehow related (two conditions in one conditional field).
These are completely 2 different conditional block. This is just giving an example of 2 different conditions setup. Once you've setup the condition that you want you will just need to click the insert button then just add what you want to display based on the condition inside the conditional block.
1. IF John Smith is not going to use "Přejmenovat autora" (rename-author) field to rename (himself) for another name, THEN the visible content's author will stay as John Smith.
Ok so you essentially want to display the default Post Author name when there is no value provided for Přejmenovat autora
I went ahead and set this up for you. Have a look at the content template below and you can see exactly how i've setup the conditional. hidden link