ok i am using the conditional gui, but the words "No Data" still appear - i am using this as a test for the field "Website" and checking to see if the test is working at hidden link
I tried both No Data in quotes and without quotes.
i am using two tests, the != with the blank, and the != with the words No Data.
one other problem, which i am having, is that Attorneys who make it to a list, fall off the list. I am thinking the way that is happening has something to do with them going into an archive state.
This is actually the primary problem. If the published date is changed to the current date, then the attorney shows up again, so that is why the word "Archive" comes to mind.
You might have to login to the site to see how the thing is set up. You might remember it more than i do!
ed
i think the problem with the field "Website" i fixed. Because copying the outer html and using that as the expression shows it was a link with a href etc.
i will work on the other fields over time. now the question is
about why an attorney would be on a list, then fall off...
ed
actually, on the "No Data" problem, i actually got things to work, but it removes the name of the field entirely, so now the word "Website" is gone. Maybe there is a way to code this so the name appears, and the word that i can choose , like the word "None". would that be going into the js customizer, or maybe there is another way?
thanks!
ed
I'm not sure how you got the word "No Data" to appear as when the fields have no information in them it should show up empty.
Ideally you would want this format correct "Website: None" ?
If so then you would need to employ 2 conditionals one to check if the field is not empty and then display the information and another to check if the field is empty and then hardcode the text in your content template.
i coded it like this but it is not working.
what did i do wrong here?
[wpv-conditional if="( $(wpcf-website) eq 'No Data' )"]Website: None<br>[/wpv-conditional]
[wpv-conditional if="( $(wpcf-website) ne '' )"]Website: [types field="website" target="_blank" output="HTML"][/types]<br>[/wpv-conditional]
I don't get the same i guess as you are getting?
i have now 4 conditionals set up ( see pic).
I have a lot of fields that are getting the No Data entry, and also i do not know where it is coming from.
If it has No Data, or is Empty, i need a way to change the text output.
if it has something there, then i'd like it to just act normally.
I apparently will need something that acts like an else statement, but i don't see how to code it.
I have a copy of the site here at hidden link
so that is where i am now coding.
on the left side see the output for the code appearing on the right side.
since i am busy trying to find a solution, things change.
let me know if you need a login and i will create one/
if i had left the Website field with 'No Data', i got the condition met.
Once i edited that attorney field with hidden link i saw the 'No Data' output again, below where it says fourth condition.
so i am totally bollixed and confused.
i read the documents, am copying and pasting your code, but still the solution evades me.
just a fyi - i know you likely will be taking a weekend. I am making progress, but for some reason i am getting line breaks when i use the conditionals.
so the output is having extra blank lines. One workaround is to remove the hardcoded <br> and combine lines but that is rather unwieldy, and will have trouble down the line. Does this make sense?
talk monday.
ed
i think i have resolved all my issues except one, and that is having to do with ordering of the attorneys when using the view
( see example at hidden link )
Thanks for your help, although i know i did the heavy lifting ( not too heavy though). You got me going in the right direction!
i solved the literal 'No Data' , as you had said, by using the conditional options eq and ne and both set to compare to the literal, and figured out how to put in content or blank or whatever. The issue of the new line i believe had to do with the options in an area below in the content template, for setting manual or auto paragraphs. But even so, I believe i had to concatenate the two conditonals together without a line break, in order for everything to work out. The ordering problem was resolved by my putting into the wp archive a new field, which i could use for ordering by string. Because i really did not want the field showing, i simply put it into a class where i could set the css to display:none.
The main issue was that the cpt were not showing up in the view, i solved by removing pagination ( set it to 'no'), which for some reason had to do with wp deciding whether or not to show these items. I also reset the general setting for showing posts from 10 to 100, alothough i am still not sure why this was happening, one thing or the other. I also used plugin to reset the date of publication, although i am not sure if that helped either. I have the development site still up, so if you wanted to explore and let me know the reason why the items did not show up, but now do, please feel free to do that. I will probably leave it up for a while.