Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    you can remove the create account field by adding the code below to your theme functions.php file (or by creating a new plugin and pasting code there)

    add_filter( 'adverts_form_load', 'remove_advert_account_field' );
    function remove_advert_account_field( $form ) {
        if($form['name'] != 'advert') {
            return $form;
        }
        foreach($form['field'] as $k => $field) {
            if($field['name'] == '_adverts_account') {
                unset($form['field'][$k]);
                break;
            }
        }
    
        return $form;
    }

    Thanks for the feedback, i understand the text should be?

    [...] me so I can manage [...]

    Thread Starter hadon.westerby

    (@hadonwesterby)

    I added the above to the base of the theme functions.php file…but was greeted with this;

    Parse error: syntax error, unexpected ‘if’ (T_IF) in /home1/XXXXXXXX/public_html/XXXXXXX.com/XXXXX/wp-content/themes/nirvana/includes/theme-functions.php on line 637

    Plugin Author Greg Winiarski

    (@gwin)

    I am not sure, do you have the code correctly copied? It does not seem to return any errors for me, in fact i tested it on my dev site before pasting here.

    Thread Starter hadon.westerby

    (@hadonwesterby)

    I did cut and paste the code as per the above.

    I’m using Nirvana theme.

    I’d need to restore WP and try again, as I can no longer access the dashboard.

    No worries – it’s a test site. I’ll follow up in due course.

    H

    Plugin Author Greg Winiarski

    (@gwin)

    Please note, that you do not need to restore site, just login via FTP and edit the theme-functions.php file.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Non-registered Users’ is closed to new replies.