The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
27 views

INSERTING Data into table with placeholders

I am trying to insert data into a table, getting errors, I have tried messaging the data, but cannot seem to get it to work, can you please help me figure out what I did wrong, please... Here is my ...
0
votes
2answers
99 views

Get category ID after wp_insert_term

I'm using wp_insert_term to create categories, after the category is created I'd like to get its ID: $cat_id = wp_insert_term($name, 'category', array('slug' => $slug) ); ...however when I try ...
3
votes
3answers
81 views

Creating a non-removable taxonomy term

Is there a way, without modifying the core, to create a term for a custom taxonomy programmatically that is non deletable? "Uncategorized" is an example, but in my case, it does not have to be the ...
0
votes
0answers
58 views

When I Use function wp_insert_term() function it gives me Invalid taxonomy object

if(isset($_REQUEST['review_add'])){ $rw_es_name = $_REQUEST['rw_es_name']; $rw_cl_name = $_REQUEST['rw_cl_name']; $rw_cl_email = $_REQUEST['rw_cl_email']; $rw_cl_review = $_REQUEST['rw_cl_review']; ...
0
votes
1answer
78 views

How to add a new child category via an SQL statement?

I have a parent category named "Europe" under which I need to insert some 20+ child categories (France, Italy, Germany, etc.) What is the SQL statement I have to fire to add - for example - France to ...
1
vote
0answers
47 views

is there import_id parameter for wp_insert_term to create custom id for category

is there option to create category with custom id like custom post id is created using parameter import_id ? $post = array( 'post_title'=>'whatever', 'post_content'=>'whatever', 'import_id'=>123 ); ...
2
votes
1answer
579 views

wp_insert_term doesn't work with custom post type's taxonomy

Here is the problem I am having: I have a custom post type called "weddingguests" This custom post type "weddingguests" has a custom taxonomy, "friendsof", hierarchic I want to programmatically ...
0
votes
1answer
103 views

Calling mysql_query() on another database, assumes WordPress using that database

I'm attempting to import some data from a legacy site into WordPress. First step is terms for taxonomy event_category. Here is my approach: $link = mysql_connect( 'localhost', 'blah', ...
-1
votes
1answer
97 views

how is it possible that using wp_insert_category throw a fatal error?

how is it possible that using wp_insert_category throw a fatal error ? I am using it as explained : http://codex.wordpress.org/Function_Reference/wp_insert_category with no change except: ...
0
votes
0answers
105 views

How to sync to custom taxonomies (tag structure)

I have two taxonomies: "Contributers" and "Narrators." I want to sync the terms in these two taxonomies identically, so much so that I wish to be able to click on "Edit Term" and see the information ...
0
votes
1answer
68 views

Adding Child Terms Programatically - No Warning but No dice either

Here's essentially what I'm doing : create_taxonomy_record(array( 'Label', 'tax_parent_slug', 'Label Related', 'this_tax_term_slug')); /* ---> ...
0
votes
0answers
153 views

wp_insert_term is adding a term that has no name

I'm trying to insert a term for a custom taxonomy and a custom post type in Wordpress. The problem I'm running in to is that it successfully inserts a term, and at the right hierarchy level, but the ...
0
votes
1answer
74 views

install.php Custom Taxonomy Term not being added to custom post

So I am stuck on this problem that I am facing when creating a custom taxonomy term in a install.php file. So I am running a WP multisite, and upon new blog creations, I am trying to auto create ...
1
vote
1answer
419 views

Handling duplicates with wp_insert_term()

I'm using wp_insert_term which works quite well Now I want some error handler for when using the same name. $term_id = wp_insert_term( $term, 'wpsc_product_category', $args ); if($term_id) {//my ...
0
votes
1answer
132 views

Problem importing categories and sub-categories

I have an array with the categories and sub-categories I want to import to the "campsite-district-county" taxonomy. My sub-categories are not being inserted with the correct parent. They're being ...
0
votes
1answer
311 views

wp_set_post_terms is assigning only the last of several terms to a post

I have this really simple setup where I loop through an array of actors, and for each actor name I successfully insert a term. Then I use wp_set_post_terms to assign the terms to a post, but this only ...
2
votes
1answer
681 views

Programmatically insert hierarchical terms & set terms for post causes glitch? [duplicate]

I am inserting an array of terms into my custom taxonomy programmatically. Some terms have parents/children. After each term has been entered, I then insert an array of posts into my custom post type. ...
3
votes
1answer
268 views

Insert new term during new post creation

i am currently working on a snippet to insert a new post dynamically (it's a custom post type). During this new post creation i need to insert terms in custom taxonomies associated to the custom post ...
2
votes
1answer
3k views

How to add terms to taxonomy with wp_insert_terms?

I have a huge excel database of locations which I want to add as terms to my current taxonomy. However, I don't know the best way to do this, as inserting manually could take weeks. I have looked at: ...
0
votes
1answer
73 views

merging terms programmatically while maintaining the count

This question is all about finding out the best way to handle merging similar terms. Let's say you have 10 posts tagged as Barack Obama and 20 posts tagged as Obama. and you want to group them all ...
6
votes
1answer
3k views

wp set object terms vs wp set post terms

Examining the following sample code snippet from the WP codex, $post = array( 'ID' => [ <post id> ] //Are you updating an existing post? 'post_author' => [ <user ID> ] //The ...
0
votes
1answer
331 views

wp_insert_term does not insert description. [closed]

I'm using this code. I cannot figure out what the heck is wrong with it? $args = array( 'description',"My Desc", 'slug' => "My Slug", 'parent' => 0 ); $result = ...
0
votes
1answer
324 views

Update custom category fields front-end

Been using this answer -->> (link) to create some custom fields in my categories and it works great ! my only problem is that i have a frontend form that allows creating new categories with an ...