• Hi
    I’m creating a site for a group of photographers to replace an existing site. One of the photographers receives all the post text and images from the other photographers by email and then loads them to the site. I’m using WP User Frontend to make it easy for him to do this – and I must say it’s fantastic! Thank you Tareq.
    I’m importing all the posts into different categories (one category for each photographer), which fits in well with WP User Frontend, but I’d also like to set the post author to match the selected category. I do not want to add another field to the form.
    I’m not a web developer – I’m an ex-COBOL developer, a long way back in the last century, so I understand the practice of coding, so can manage a few fiddles, but don’t speak the language of PHP. I’ve found my way to wpuf-add-post.php and have found where the post author is set (to either the original or a default), but cannot work out how to change the code to set the author to match the selected category. I know sql (a bit rusty, but I get there) and could potentially adjust the category and author IDs to match, if this helps.
    Can anyone suggest a solution, please? The line of code I think I need to replace is this:
    $post_author = (wpuf_get_option( ‘post_author’, ‘wpuf_frontend_posting’ ) == ‘original’ ) ? $userdata->ID : wpuf_get_option( ‘map_author’, ‘wpuf_frontend_posting’ );

    Many thanks

    Vicki

    http://ww.wp.xz.cn/plugins/wp-user-frontend/

The topic ‘Set post author as selected category’ is closed to new replies.