Home Forums Plugin Support WP User Frontend (Free Version) Template Overrides

This topic is: resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Tareq Hasan 5 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7667

    RockNRolla
    Participant
    Post count: 14

    Hello

    Im loving the plugin so far. But I need to make couple changes, I hope you can help me with these issues / questions:

    1) How to make changes in template files etc… so that plugin upgrade will not overwrite my edited code? is it possible to copy plugins template files in my theme file and make changes there? if So, can you please give me instructions on folder architecture etc… ?

    2) Im working with a guest post functionality, I need to Move, Name and Email fields for guest post, right above the Submit Button, and below the post title and post body, how can I achieve this?

    3) Is it possible to hide the post title field and prefill it with custom data, for example “Guest Post Number X” where the X would be an integer increasing automatically per each post?

    Thanks in advance!
    Cheers

    #7671

    Tareq Hasan
    Keymaster
    Post count: 2831

    1) What do you mean by plugin template files? The plugin doesn't have any template. How did you edited the plugin? There are some action/filters available in the plugin. Did you used that? In that case put them in your themes functions.php and they should be safe.

    2) Currently you can't do this, to achieve that, you have to edit the plugin code. So it'll obviously be removed when a new version update comes to the plugin. If you are still interested, open /class/render-form.php, see the lines 273-375. It looks like this:
    [php]
    if ( !is_user_logged_in() && $form_settings[‘guest_post'] == ‘true' && $form_settings[‘guest_details'] == ‘true' ) {
    $this->guest_fields( $form_settings );
    }
    [/php]
    Move these lines just before this line: $this->submit_button( $form_id, $form_settings, $post_id );

    3. Yes you could do that by using the filter wpuf_add_post_args. You can dynamically push the post title from a function with your desired format.

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

The topic ‘Template Overrides’ is closed to new replies.