Support » How-To and Troubleshooting » Plugin development – three questions

Plugin development – three questions

  • I am developing a plugin and I have following code:


    function businesses_navigation()
    add_object_page(“Firms Manager”, “Firms”, 8, ‘firm_listing’, “business_listings”);

    add_submenu_page(‘firm_listing’, ‘Add Firm’ , ‘Add Firm’, 8, ‘firm, ‘add_firm’ );


    function business_listings()
    global $wpdb;

    function add_firm()
    global $wpdb;

    1. Main menu ‘Firms’ item also appears in submenu.

    2. The submenu page ‘Add Firm’ is used to add/edit a firm. But when after adding a firm I try to redirect to ‘firm listing’ page I get the headers already sent error. “Warning: Cannot modify header information – headers already sent by (output started at <path>\wordpress3\wp-admin\admin-header.php:19)”. JavaScript redirect is an option but I don’t want to use it.

    3. I want to change the page/title header dynamically when user is ‘editing’ the firm rather than ‘adding’. Right now it always shows ‘Add Firm’.

    Please let me know how I can achieve the above.


  • The topic ‘Plugin development – three questions’ is closed to new replies.
Skip to toolbar