Code Questions

I am using wordpress. I have a plugin that feeds in a long set of web addresses into one list. I want to display these links as simple “register” where the user can click the register text and follow the link. I have used href to do this and it works. The problem is some of the entries do not have links (you cant register yet) but the text “register” will appear no matter what. I was hoping to find a way where when there it no link to follow that the text would be automatically hidden. The plugin still uses the its own value, so it is not just blank.

Register

The %event_custom_field{Registration}% sometimes is a link and sometimes is not.

This is the page I am trying to do this on… http://www.scnca.net/event-list/

I was told that: http://www.php.net/strstr would do the trick, but I am totally lost with PHP and I was hoping that someone could help me out with this a little further.

Thanks so much!

I don’t know how your list is setup.

Because I would use a loop, more than likely using a database, use a conditional.

Do the sites that you cannot register on have an href?

I am using wordpress and I have been able to use href for many things. I guess what I am looking for is an if statement for html but I don’t know how to do that.

The database is added through the short code that feed in other information.

[hr]

[eo_events event_start_before=“12/31/2014” event_start_after=“1/1/2014” showpastevents=true] %start{M jS}% %event_title%%event_cats%%event_custom_field{City}%%event_custom_field{Points}%RegisterResults [/eo_events]

[hr]

Above is the code that I need edited under the Registration and The Results section.

Basically they always show no matter what the link is or isnt. And I want it to look at the target and ask it if there is a target or not. If not remove the text that href would display.

Thank you so much for your help. I don’t know what I would do without the help of wonderful people like you!

Michael

I don’t use off the shelf CMS. I haven’t even tried to modify one yet. So I can’t help in that regard.

HTML is only a markup language, your if’s and loop’s will need to be done either on the server-side or the client-side.

I am unsure of how to guide you honestly. Normally I would say you pull from the database and if website_column != “” then echo it. But I don’t know how your plugin or WordPress works.

Sponsor our Newsletter | Privacy Policy | Terms of Service