• Resolved Jerry Craig

    (@cupbearer)


    I’ve got a couple questions.

    1) I’ve got a multisite install and am using custom product post_types in subdirectory blogs. As each Product is posted I would like to create a Product ID number that is unique that includes the “Blog Id number – post id” which should then be unique across the multisite install.

    2) I would like to also use the same categories and tags across the entire multisite install. I’m using CMS Press to create my custom post_type. Do I just reset the blog to original before the CMS Press hook somehow or maybe a custom query and custom plugin? I’m going to use a sphinx search server and I’m hoping for a large number of individual product listings. The size should be small though of each record. The Categories are going to match Google’s Product Taxonomy and the tags are going to be used for my Meta Keywords so I will actually need both although that’s probably not considered best practices.

    Thanks,

    Cupbearer

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter Jerry Craig

    (@cupbearer)

    sorry, so long in between replies, I’m supposed to be on vacation hanging out at the beach with the family ?? We each have to have our hobbies i guess.

    It’s going to be both. used in the header for each post/page, the only difference is that for a single post page I want to add that 1 extra bit of info which should be pretty easy I would guess. It’s a matter of narrowing the ID for that code down to being able to take a permalink like https://foodnav.org/lilsassysalsa/about and convert that into an ID. The 102 is the ID of the about page on that site as I’ve been messing around with adding a bunch of stuff and finally got around to the zip code thing after I had all the other post stuff figured out.

    And should I just run the heck out of this thread, as you might imagine this is the beginning of a very long acquaintance since there doesn’t seem to be many that I can ask these questions of. Separating them to some degree might be better as others can then search them better and use them for reference?

    Thanks,

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Separation of questions would be best ??

    I’m about to head out till Sunday, anyway. Maybe someone else has an idea, but my brain stopped after biking in the rain.

    Thread Starter Jerry Craig

    (@cupbearer)

    cool, fun travel day tomorrow and too much vodka tonight to be discernable. I’ll be home Sunday myself with a real desktop and some room to work and think. Although I think I’ll be hitting up my sphinx server for a few days. I really appreciate the ideas. I’m really lacking someone to bounce this stuff off of ??

    and if i still played, dorf clerics rule ?? I and II

    Thread Starter Jerry Craig

    (@cupbearer)

    I’ve decided that I’m going to use the add_option() to get the zip code to be available on every page. I’ll have to figure out how to use that but was thinking that I could add that to the options table when I was on the plane today at 35,000 feet with no way to check what I was thinking.

    For #2 above I think I might of figured out how to get started with that one as well. With the new 3.1.x WordPress they put a lot of the “screen options” at the top of the page. I should be able to add my own check box/widget in there that will have it’s own db query to blog 0 for categories and tags. I’ll keep you posted on the progress of that one as I’ve seen tons of requests for something like that and no clear answers on how to get global categories and tags. This will hopefully work with my custom post_type.

    Thanks,

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I should be able to add my own check box/widget in there that will have it’s own db query to blog 0 for categories and tags.

    THAT can be done. I’ve not the faintest idea how, but I know plugins can do it.

    Thread Starter Jerry Craig

    (@cupbearer)

    Ok, I’m back and have been working on the Zip Code to be able to put in the Title tag area as well as eventually GeoCode the posts. But, I’m stuck again. I’ve decided that I could just use a plugin and put this in mu-plugins folder and then add it once in the General Settings for each sub-blog. Then I can just pull from blog_info when I want the info back. The field is showing up in html, but when I add the zip code it’s not saving to the database and it’s not even creating the field in the options table? I’m thinking that I should have update_option() in there somewhere, but I thought the whole settings thing was supposed to take care of adding and updating the fields?

    <?php
    	function optzipgeo_init()
    	{
    		register_setting('optzipgeo_options', 'optzipgeo');
    	}
    
    	add_action ('admin_init', 'optzipgeo_init');
    
    	function optzipgeo_field() {
    		?>
            <input type="text" name="optzipgeo" id="optzipgeo"
            		value="<?php echo get_option('optzipgeo'); ?>" />
            <?php
    		};
    
    	function optzipgeo_plugin_menu ()
    		{
    			add_settings_field('optzipgeo', 'Options Zip Code for Geotag', 'optzipgeo_field', 'general');
    		}
    
    	add_action('admin_menu','optzipgeo_plugin_menu');
    ?>

    Thanks,

    Thread Starter Jerry Craig

    (@cupbearer)

    you can close this one. It was in the register_setting line. It should read:

    register_setting('general', 'optzipgeo');

    Since I was trying to add the optional field into the General Settings tab, it needs to be “whitelisted” in register settings in ‘general’. All of the tutorials don’t really talk about whitelisting something.

    I’m going to work on the other part in another thread.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Multisite Blog_ID’ is closed to new replies.