Description Usage Arguments Value Examples
View source: R/update-wp-cat.R
Update the name, description, or slug of a category in your WordPress site.
1 2 3 4 5 6 7 8 9 10 | update_wp_cat(
domain,
user,
pass,
tag_id,
tag_name,
tag_slug,
tag_description,
verbose = TRUE
)
|
domain |
The domain on which you wish to update the given category. |
user |
The username to be passed into the API call to update the category. |
pass |
The password to be used in the API call to update the category. To get this value, you must have the Application Passwords plugin installed, and must create an application using that plugin via your WordPress admin panel; there you will get the password needed. |
tag_id |
The ID of the category desired to be updated in the WordPress site's database. |
tag_name |
The desired name of the category that users will see on the WordPress site. |
tag_slug |
The slug to be associated with the WordPress category. Change with caution, as changing the slug may result in URLs being broken. |
tag_description |
The description of the category; this value will be used wherever the description of the WordPress category is used (perhaps in your theme). |
verbose |
Defaults to TRUE; determines whether or not the desired category name and slug will be printed in the console. Potentially useful if employing this function in a loop in which many categories will be updated at once. |
response from the API. 200 means success – the category was updated!
1 2 3 4 5 6 7 | ## Not run:
update_wp_cat(root_url = 'https://domain.com',user = Sys.getenv('username'),
pass = Sys.getenv('password'),
tag_name = 'cool posts',description_text = 'this is the description text for the category
"very cool posts". ')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.