Support

Account

Home Forums Backend Issues (wp-admin) Binding to post category on multisites

Helping

Binding to post category on multisites

  • Hi,

    I have a problem binding my custom fields to post category on multisite wordpress. It seems when I look at the code, after I have exported to PHP, that it is bound on the tag_ID number of the post category.

    Like this:

    'location' => array (
    			array (
    				array (
    					'param' => 'post_category',
    					'operator' => '==',
    					'value' => '5',
    					'order_no' => 0,
    					'group_no' => 0,
    				),
    			),
    		),

    This is problem for me, because I can’t be sure that the post category has the same ID across the blogs.

    Is there a way I can bind them on the category slug, or is there another solution to this.

  • hey jonashh

    you can use this to get the id

    $get_cat_ID = get_cat_ID( ‘cat_name’ );

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.