Viewing 3 replies - 1 through 3 (of 3 total)
  • chittaranjan,

    You should be able to do this, really it should make no difference whether it’s the main site or not, on a multisite. Are the settings the same in All in One SEO Pack on each of these sites?

    Thread Starter chittaranjan

    (@chittaranjan)

    The issue was found to be something else. The main reason is when a new site is created, the default options aioseop_options of this plugin are not assigned to the new site. Expecting this to cause problem with the above hook to work. The moment I assigned the default options, the hook started working.

    if ( function_exists ( 'aioseop_mrt_mkarry' ) )
         aioseop_mrt_mkarry();

    I had use the above code when a new site is created. This plugin function aioseop_mrt_mkarry assigns all the default options to the site.

    Also there is another problem with these default options. Since these options are not assigned automatically, the columns for these seo data on pages and posts screens do not show up. Again after assigning the default values, the columns show up.

    On the General Settings page of this plugin (of a newly created subsite), you will see many fields having values or checked. But if you check in the database the above aioseop_options does not exist. So the data you see on the settings page come from some default values not from database which it should be doing. This gives you a wrong feeling that the options exist but actually they do not. It gets reflected in the database only after I hit the Update Options button.

    The above problem is not there on subsites which already exist before the plugin activation. The sites which get created after the plugin activation have problem as mentioned above.

    Please let me know if any of the above points is unclear.

    Thanks

    chittaranjan,

    This sounds like an interesting issue; if you look at the aioseop_mrt_mkarry() function, you’ll see it functions by getting the default values in the plugin and then setting up aioseop_options with those default values. It should only be run if aioseop_options doesn’t already exist, and after the class instance $aioseop etc. is initialized in the plugin. By default this should get called during init when add_hooks() is called, which will call aioseop_update_settings_check(). This checks if $aioseop_options isn’t set up, which will then call aioseop_mrt_mkarry(). I tested by creating a new child site and going to it while the plugin was network activated, and aioseop_options was created properly, so this process works out of the box.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Meta title hook’ is closed to new replies.