• Resolved Vitaly

    (@vitrost)


    Frontier Post Capabilities settings allow choosing multiple categories for editors and authors. This feature is very useful but not obvious for users when they are creating or editing an article. Could you add a comment in the frontend editor when this option is selected or would you suggest to modify the frontier_post_form_standard.php file after placing in into theme folder?

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

    (@finnj)

    I believe it would be clunky, if I added such comments as standard, as there is so many different ways Frontier Post is used.

    I would prefer if you could use Actions to display additional information –

    frontier_post_form_standard.php has the below actions actions:
    frontier_post_form_standard_top (Fires just before the editor)
    or
    frontier_post_form_standard (Fires just before submit buttons)

    example of coding here:
    https://wpfrontier.com/frontier-post-add-fields/
    https://wpfrontier.com/frontier-post-actions-hooks/

    – It could make sense to add an additional action – ex: frontier_post_form_standard_tax – that would fire just before the taxonomies (and category) is displayed.

    let me know what you think.

    Thread Starter Vitaly

    (@vitrost)

    I couldn’t make it through adding fields and actions, finnj.
    The most reliable solution for me is to add a <div> block with text to frontier_post_form_standard.php template in my theme folder, and display it with css if category <select> field has a “multiple” attribute equal to “multiple”.

    Plugin Author finnj

    (@finnj)

    in version 4.4.4 there is a new action: frontier_post_form_standard_tax

    You could add the following code to your functions.php:

    
    function fp_my_custom_tax_output($thispost, $tmp_task_new, $tmp_tax_name)
       {
       if ($tmp_tax_name == "category")
         Echo '<div id="fp_tax_explanation">*** Your explanation text***</div>';
       }
    
    // add the action	
    add_action( 'frontier_post_form_standard_tax', 'fp_my_custom_tax_output', 10, 2 );
    

    Below you can see the code of the action

    
    //****************************************************************************************************
    // Action fires before displaying taxonomies
    // Do action 		frontier_post_form_standard_top
    // $thispost 		Post object for the post  
    // $tmp_task_new  	Equals true if the user is adding a post
    // $tmp_tax_name	Name of Taxonomy (ex Category")
    
    //****************************************************************************************************
    	
    do_action('frontier_post_form_standard_tax', $thispost, $tmp_task_new, $tmp_tax_name);
    			
    
    • This reply was modified 7 years, 3 months ago by finnj.
    • This reply was modified 7 years, 3 months ago by finnj.
    • This reply was modified 7 years, 3 months ago by finnj.
    • This reply was modified 7 years, 3 months ago by finnj.
    Thread Starter Vitaly

    (@vitrost)

    Thank you very much, finnj!
    Will try your solution after next FP update.

    Plugin Author finnj

    (@finnj)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add a notification if categories multiselect with + Ctrl is set’ is closed to new replies.