Plugin development - three questions (1 post)

  1. ssruprai@hotmail.com
    Posted 5 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by ssruprai@hotmail.com
  • This topic is not resolved
  • WordPress version: 3.0