create_wp_tags: Create a New WordPress Tag

Description Usage Arguments Value Examples

View source: R/create-wp-tags.R

Description

Create a tag on your WordPress site using your WordPress site's API.

Usage

1
create_wp_tags(root_url, user, pass, tag_name, description_text)

Arguments

root_url

The domain on which you wish to create the post.

user

The username to be passed into the API call to create the post.

pass

The password to be used in the API call to create the post. 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_name

The text string associated with the tag.

description_text

The description of the tag; this value will be used wherever the description of the WordPress tag is used (perhaps in your theme).

Value

response from the API. 200 means the tag was created!

Examples

1
2
3
4
5
## Not run: 
create_wp_tag(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 tag "cool posts". ')

## End(Not run)

simitpatel/wordpressr documentation built on Dec. 31, 2021, 6:38 a.m.