Hi rt, Excellent news that you’ve managed to get the category on the short code to work, my site was crying out for this facility.
I’ve followed your instructions:
post-from-site.class.php
This is line 396
$out .= apply_filters( ‘pfs_before_submit’, ”, $idtext );
After that line, I added the following
$out .= “<input type=’hidden’ name=’cat’ value='” .$cat. “‘ />\n”;
pfs-submit.php
This is line 25
$title = $pfs_data[‘title’];
After that line, I added the following
$category = $pfs_data[‘cat’];
This is line 142
$postarr[‘post_type’] = $pfs_options[‘post_type’];
After that line, I added the following
$postarr[‘post_category’] = array($category);
Used shortcode [post-from-site cat=’4′]
and i’m not getting the category to assign.
I need this to work on the shortcode as I have numberious areas that require Posts to relate to different categories but I don’t want the category dropdown on teh form.
I’m using WordPress 3.3.1 and Post from Site 3.0.1
Any assistance would be greatfully received or a full code for post-from-site.class.php and pfs-submit.php as i’m not sure why it’s not working.
Mike