Forum Replies Created

  • Hi James, yes I solved this a couple days ago, just been too busy to post.

    I ended up with this:
    $temp_post = get_post($post_id);

    $author_id = $temp_post->post_author;

    $background_main = get_field(‘background_image’, ‘user_’ . $author_id);
    background-image:url(‘<?php echo $background_main; ?>’)

  • This is what I am using to identify the author inside my template. I chose to make a custom template because it will allow me to duplicate the page and set the author to specific person. Person will then be able to an account page I set up with custom user form, which includes two image fields (a logo and background), to customize their page.

    $user_info = get_userdata( $post -> post_author );?>

    These work:
    <?php echo ” . $user_info->farm_name . “\n” ?>
    <?php echo ” . $user_info->contact_number . “\n” ?>
    <?php echo ” . $user_info->stream_name ?>
    <?php echo ” . $user_info->app_name ?>
    <?php echo ” . $user_info->background_color . “\n” ?>
    <?php echo ” . $user_info->font_color . “\n” ?>;”>

    I tried using the example, but that left me no fields rendering.
    This is the closest I’ve gotten to a return of anything, in this case, the field id.
    <?php echo ” . $user_info->background_image ?>

    I do apologize for my lack of knowledge. Html has been much friendlier to me. I honestly paid someone a good sum to set this all up for me 2 years ago, but after a multitude of excuses, and finally ignoring me completely it’s obvious if I want something done, I’ll have to do it.

  • Thanks James, I’m trying to apply fields as custom page styles. Color and text fields come up fine, but background images are not rendering. Do I need to apply them as a function first?

Viewing 3 posts - 1 through 3 (of 3 total)