Styling custom fields

Home Forums Calendar Products Events Calendar PRO Styling custom fields

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #45757
    Joshua
    Participant

    Hello, I am using custom fields in both my list.php and singl.php. I am using the “get custom fields” action and noticed it wraps the code around a column . I would like to have control over this so that it would fit in where I need it to.

    See what I mean here: http://new.escoladabiblia.com/cursos/ – The “Dias:” info does not fit in well.

    #45855
    Jonah
    Participant

    Hi Joshua,

    If you’re using the tribe_the_custom_fields() function, it will wrap things in extra markup. Use tribe_get_custom_fields() instead.

    Does that help?

    #45997
    Joshua
    Participant

    Hey Jonah,

    I’m not that good with PHP but I’m trying. Please check out the code I’m ussing. For some reason its showing up as “array”. Not sure what this is. I would like only the value of the custom filed to appear here. The label was entered manually.
    Here is the code: http://awesomescreenshot.com/010166lkec

    #46002
    Joshua
    Participant

    Hey, figured out how to show my custom field – I just had to add a label in between the parenthesis. I would like to know if there is anyway to customize the display of the custom field’s value. For example, I am using a checkbox custom field that is currently showing as “value1|value2”. How can I get this to show up like this: “value1 and value2” when there are multiple checkboxes selected?

    #46004
    Jonah
    Participant

    Hi Joshua,

    There are some limitations with this. It might help to know more about what you’re trying to accomplish so I can provide some suggestions.

    #46006
    Joshua
    Participant

    Hey Jonah, I created a custom field (checkbox style) where the label is “days” and the values are the weekdays (mon, tue, wed, thu, fri, sat, sun). So, if an event is on Tuesdays and Wednesday, I can create an event and select tue adn wed. I would like the custom field to show up as “tue and wed” instead of its currently display “tue|wed”. Do I have to add some code to the php get_custom_fields?

    #46012
    Jonah
    Participant

    Hi Joshua,

    Ok, that helps. What I would suggest is to not use our plugin for custom fields and use this one instead: http://www.advancedcustomfields.com/ – much better handling of data and much easier to get to it. So, if you were to setup a checkbox field, then just check out the documentation for how to get to that data: http://www.advancedcustomfields.com/resources/field-types/checkbox/

    Does that help?

    #46013
    Joshua
    Participant

    Hey Jonah. That probably would do the trick, however I would like to keep everything with The Event Calendar Pro. If there is no way to change the character separating each value, I would rather create a new text custom field and just write out “value 1 and value 2” for each event. Makes sense?

    #46014
    Jonah
    Participant

    Hi Joshua,

    It’s still possible to use ECP in this way for your custom fields but you’ll need to split values with PHP and it starts to get messy. For example, you could use the explode() function to help you with this: http://php.net/manual/en/function.explode.php – that’s not ideal though. It’d be better to use the plugin I suggested above or find another solution.

    #46017
    Joshua
    Participant

    Thanks Jonah. I’m satisfied with how we resolved this issue!

    #46020
    Jonah
    Participant

    Glad to be of service! Let us know if there’s anything else you need help with.

    #978947
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Styling custom fields’ is closed to new replies.