Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Custom Field (Checkboxes) retrieve and update – from anywhere


  • joepesci
    Participant

    @joepesci

    I’ve created a custom field (Checkboxes) in WordPress > Users > Profile Fields. My site is an omni site for news, so it collects news from 20 different sources via RSS, and adds them ass posts in my WordPress site. This is how my custom field looks like:
    Custom field
    enter image description here

    If you’re only a visitor on my front page I’ll show all posts on the startpage.

    If you are a logged in user; then you should be able to select and save wich of the 20 sources you want to read in your startpage on my site. This is possible to select and save today, but only from BP User Settings page:
    User settings
    Select and Save sources from BP User Settings

    Now, the issue with the Users Profile Settings page is:

    a) I do not want to have the form in the tab “Profile > Edit”. I want my form on my startpage (above the news flow, for logged on users of course) and perhaps in a widget sometime – anyhow – the most important this is freedom to place (and style) the form wherever I want.

    b) The form includes fields I want to remove (Name and Description, i.e. “sources” = field name) etc.

    The user on the image above has selected and saved to read news from 2 different sources on my website. The code that handles this is on the startpage in my index.php is:

    $sources = xprofile_get_field_data( 'sources', $current_user_id, $multi_format = 'array' );
    query_posts(array('category__and'=>array($sources)));

    Question: Is there a way of retrieving this form and update in from anywhere for logged in users? I don’t want to be bound to the idea of only having the form in the Profile Settings page. I want the user to have to form above my news flow on the startpage of my site, so the users gets the feeling of “Oh, I can customize my news flow if I create an account!” – and this should be done from anywhere for logged in users.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘User Custom Field (Checkboxes) retrieve and update – from anywhere’ is closed to new replies.
Skip to toolbar