Posted: May 22, 2014 at 5:45 am
|
Hi there, I was wondering if you could help me out with a little problem. So i added: $custom_question_1 = ‘<span class=”attendee-answer”>’. do_shortcode(‘[EE_ANSWER q=”6″ a=”‘.$id.'”]’) . ‘</span>’; to the file, and it works because with css i determined that it should float to the right, like this: .attendee-answer { Buttt now i see, that the list was already echo’ing the city under the Name by itself. So now i have the city two times in the list. I want to have the city on the right side, as is, and the one under the name gone. could you help me to do this? This is a link to the page where it goes wrong: hope you can help me out so i can fix it again:) cheers |
Hi, The question your are pulling using [EE_ANSWER q=”6″ a=”‘.$id.'”] appears to be the system question ‘city’, is that correct? If so you do no need to pull the info again as you are now. You can simply add you span with the custom class around the $city_state variable on line 91. <li class="attendee_details"> <span class="espresso_attendee"><?php echo $gravatar ?><?php echo stripslashes_deep($fname . ' ' . $lname) . '<span class="attendee-answer">' . $city_state . '</span>' . '</p>'; ?> </span> $city_state actually outputs the attendees City and State, so you coud just change that to $city to just display the attendees city. So then you wont need the $custom_question variable to pull and info, or be included within the output. Does that make sense? Also have you moved you modified attendee_list.php template file to wp-content/uploads/espresso/templates/ to prevents it being overwritten during updates? |
|
Just to note, the syntax highlighter modified the code as I posted it, it has now been corrected. |
|
|
Hi there, thank you for your response, it sounds clear. In other events i do use a EEanswer shortcode to display a sail number, and that needs to keep working. So only the city needs not to be displayed for now. hope you can help me out again:) to answer your other question, yes i kopied the file to the uploads…etc. folder, so changes won’t be lost:) cheerss |
|
Then you would change line 91 to be: <li class="attendee_details"> <span class="espresso_attendee"><?php echo $gravatar ?><?php echo stripslashes_deep($fname . ' ' . $lname) . '</p>'; ?> </span> |
|
Hi again, is it possible to add some kind of css code that refers to the city id? Because if i change the code in the php file, and want to go back to the file i use right now, i have to search what to add again. i’m sorry if my explanation isn’t clear, i did my best ha ha. hope you have any other suggestions? cheers |
|
Hi, You could change the template to something like this <li class="attendee_details"> <span class="espresso_attendee"><?php echo $gravatar ?><?php echo stripslashes_deep($fname . ' ' . $lname) . '<span class="citycss">' . $city_state .'</span> '; ?> </span> <div class="clear"></div> </li> which adds a span around the city with a class citycss, which can then be targeted by CSS. With a little bit of HTML and PHP you could modify that whole template to suit your needs. If you don’t know HTML or PHP you may wish to contact a web developer to assist you.
|
The support post ‘Attendees answer in listing displays 2 times.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.