Skip to Content

WordPress Integration

Connect your WordPress site to publish content generated in Asky directly to your WordPress blog or pages.

What You Get

Connecting WordPress enables:

FeatureDescription
Content PublishingPublish articles and posts directly
Post TypesSupport for posts and pages
Categories & TagsAssign WordPress categories and tags
Featured ImagesUpload featured images (coming soon)
Status OptionsPublish or save as draft

Prerequisites

Before connecting, ensure you have:

  • Administrator or Editor access to your WordPress site
  • WordPress.com account OR self-hosted WordPress with REST API enabled
  • (Recommended for self-hosted) The Code Snippets plugin (free) installed, with a small PHP snippet activated to render JSON-LD on the front-end. See Schema.org Structured Data Setup below.

WordPress.com requirements:

  • WordPress.com account
  • At least one site on WordPress.com
  • Administrator or Editor access

Connecting WordPress

Go to SettingsConnections in Asky.

Find WordPress

Locate the WordPress card.

Click Connect

Click the Connect button.

Authorize Access

You’ll be redirected to WordPress.com:

  1. Sign in to your WordPress.com account
  2. Review the permissions requested
  3. Select which site(s) to authorize
  4. Click Approve

If you have multiple WordPress.com sites, select the one you want to publish to and click Confirm. You’ll be redirected back to Asky with WordPress connected.

Complete Setup

You’ll be redirected back to Asky with WordPress connected.

Schema.org Structured Data Setup

Asky generates JSON-LD structured data for every draft and sends it to a custom post meta field called asky_json_ld on publish. For this schema to actually render as a <script type="application/ld+json"> tag on your live page, WordPress needs a small PHP snippet that registers the meta field with the REST API and outputs it inside <head> on each post.

This is a one-time setup per site. After completing it, every future publish from Asky automatically includes structured data on the live page.

Structured data helps AI search engines (ChatGPT, Perplexity, Gemini, Claude) understand and cite your page correctly. Without this setup, content publishing still works, but your pages render no Asky-generated JSON-LD and miss the added AEO benefit.

The setup below applies to self-hosted WordPress (WordPress.org). WordPress.com customers need to be on a Business or Commerce plan to install plugins. The same snippet works, but lower-tier WordPress.com plans cannot run custom PHP.

Use a snippet plugin (don’t edit functions.php)

Editing functions.php directly is risky for non-technical users; a single syntax error can take the site offline. Instead, install a snippet plugin that runs PHP safely with a UI. We recommend either:

  • Code Snippets  (free, by Code Snippets Pro): the most popular plugin for this use case
  • WPCode  (free, by AwesomeMotive): a modern alternative with similar functionality

If you already have one installed, use it. Otherwise, either is a fine choice. The instructions below use Code Snippets, but WPCode follows the same flow.

Install Code Snippets

  1. In your WordPress admin, go to Plugins → Add Plugin
  2. Search for Code Snippets
  3. Install and activate the plugin by Code Snippets Pro (free version is sufficient)

WordPress plugin browser with the Code Snippets plugin shown in search results

Open the Snippets menu

In the WordPress admin sidebar, open Snippets → All Snippets.

WordPress admin sidebar with the Snippets menu opened to All Snippets

Click Add New

At the top of the All Snippets page, click the Add New button.

All Snippets page with the Add New button highlighted

Choose the PHP / Functions snippet type

On the Add New Snippet screen, confirm the snippet type is set to PHP / Functions (the default). If you need to change it, click the type selector in the top-right of the title field.

Add New Snippet form with the snippet type selector showing PHP / Functions, HTML, CSS, JS options

Name, paste, and activate

  1. Name: enter Asky JSON-LD Schema
  2. Snippet Content: paste the code below into the editor (do not include the <?php opening tag, Code Snippets adds it automatically)
  3. Location (right sidebar): leave as Run everywhere
  4. Conditions: none needed. The snippet itself only runs on singular posts that have schema attached
  5. Click Save and Activate
// 1. Register asky_json_ld so the WordPress REST API accepts it from Asky add_action( 'init', function() { register_post_meta( '', 'asky_json_ld', array( 'show_in_rest' => true, 'single' => true, 'type' => 'string', 'auth_callback' => function() { return current_user_can( 'edit_posts' ); }, ) ); } ); // 2. Render the JSON-LD on the live page inside <head> add_action( 'wp_head', function() { if ( ! is_singular() ) { return; } $raw = get_post_meta( get_the_ID(), 'asky_json_ld', true ); if ( empty( $raw ) ) { return; } $decoded = json_decode( $raw ); if ( $decoded === null ) { return; } echo "\n<script type=\"application/ld+json\" class=\"asky-schema\">" . wp_json_encode( $decoded ) . "</script>\n"; }, 20 );

The first block tells WordPress’s REST API to accept asky_json_ld as valid post meta. Without this, WordPress silently drops the value when Asky publishes. The second block outputs it as a valid <script> tag on every singular post or page that has schema attached. The tag includes class="asky-schema" so you can easily identify it in the page source and distinguish it from any JSON-LD added by SEO plugins.

Completed snippet with name "Asky JSON-LD Schema", PHP code pasted, Location set to "Run everywhere", and the Save and Activate button highlighted

Verify it’s working

  1. Publish any content draft from Asky to this WordPress site
  2. Open the published post in WordPress admin and click Preview (or open the live URL if published)
  3. View the page source (Ctrl/Cmd + U) and search for asky-schema
  4. You should see a populated <script type="application/ld+json" class="asky-schema"> block containing the article’s JSON-LD

If your site uses an SEO plugin like Yoast or RankMath, you may see two JSON-LD blocks on the page: one from the SEO plugin (typically with class="yoast-schema-graph" or similar) and one from Asky (with class="asky-schema"). This is expected and valid. Google and AI crawlers handle multiple JSON-LD blocks correctly. Asky’s block adds types your SEO plugin may not generate automatically (for example FAQPage and HowTo).

Paste the live URL into Google’s Rich Results Test  to confirm the schema parses cleanly and Google recognizes the types.

Troubleshooting

The <script> tag doesn’t appear on the live page:

  1. Confirm the snippet is Active in Snippets → All Snippets (green toggle)
  2. Verify the snippet’s location is set to Run snippet everywhere
  3. Open the post in the WordPress admin, scroll down to Custom Fields (enable via Screen Options if hidden), and check whether a field named asky_json_ld exists. If missing, the REST API rejected the value. Re-publish from Asky after activating the snippet.
  4. Re-publish the draft from Asky’s Content Library, then reload the page

The <script> tag is there but empty:

  1. The draft you published didn’t have schema attached. Open the draft in Asky and review the Schema.org preview before publishing again.

Articles published before this setup don’t have schema:

  1. Complete the setup, then republish those drafts from the Content Library. New publishes include structured data automatically.

My SEO plugin already adds JSON-LD, do I need this?

  1. Asky’s schema is complementary to plugins like Yoast or RankMath. Asky generates richer types based on your article content (for example FAQPage for articles with Q&A sections and HowTo for instructional content) that most SEO plugins don’t auto-generate. Both can coexist.

Publishing Content

From Content Library

To publish content to WordPress:

Select Content

  1. Go to Content Library in the sidebar
  2. Click on the content you want to publish

Verify Content Status

Ensure content is in “Ready” status. Edit if needed.

Click Publish

Click the Publish button.

Select Destination

Choose WordPress as the destination.

Configure Options

Set publishing options:

Post Type:

  • Post: Standard blog post
  • Page: Static page

Status:

  • Publish: Goes live immediately
  • Draft: Saved as draft for review

Categories (for posts):

  • Select from existing categories
  • Or leave uncategorized

Tags (for posts):

  • Add relevant tags
  • Separate multiple tags with commas

Featured Image (coming soon):

  • Upload or select featured image

Confirm and Publish

Click Publish to send content to WordPress.

Tracking Status

After publishing:

  • Content status changes to “Publishing”
  • Status updates to “Published” when complete
  • Link to WordPress post is provided
  • Any errors are displayed with details

Viewing on WordPress

Published content appears in your WordPress admin:

  1. Log in to WordPress
  2. Go to Posts or Pages
  3. Find your newly published content

Content Formatting

What Gets Published

Asky ContentWordPress Equivalent
TitlePost/Page title
BodyPost/Page content
SummaryExcerpt (if available)
SlugPost slug/permalink

Formatting Support

Asky content supports:

  • Headings (H1-H6)
  • Bold and italic text
  • Bulleted and numbered lists
  • Links
  • Block quotes
  • Code blocks

HTML Handling

Content is converted to clean HTML compatible with:

  • WordPress Classic Editor
  • Block Editor (Gutenberg)
  • Most WordPress themes

Managing the Connection

Viewing Status

The connection card shows:

  • Connection status (Connected, Expired, Error)
  • Connected WordPress account
  • Selected site
  • Last publish time

Switching Sites

To publish to a different site:

  1. Go to SettingsConnections
  2. Find WordPress
  3. Click Change Site
  4. Select new site

Disconnecting

To disconnect WordPress:

  1. Go to SettingsConnections
  2. Find WordPress
  3. Click Disconnect
  4. Confirm

Disconnecting:

  • Stops ability to publish new content
  • Does not delete content already in WordPress
  • Can be reconnected anytime

Revoking Access

You can also revoke access from WordPress:

WordPress.com:

  1. Go to WordPress.com 
  2. Navigate to MeAccount SettingsConnected Apps
  3. Find Asky and click Disconnect

Self-hosted:

  1. Go to your WordPress admin
  2. Navigate to UsersYour Profile
  3. Find Application Passwords
  4. Revoke Asky’s password

Troubleshooting

Connection Failed

“Authorization Failed”:

  1. Verify you’re logging into the correct WordPress account
  2. Check you have Editor or Administrator access
  3. For self-hosted: ensure REST API is enabled
  4. Try disconnecting and reconnecting

“Site Not Found”:

  1. Verify the site URL is correct
  2. Check site is accessible
  3. For self-hosted: ensure REST API isn’t blocked

Publishing Fails

“Permission Denied”:

  1. Verify your user role (need Editor or Admin)
  2. Check if publishing is restricted
  3. Reconnect with appropriate permissions

“Invalid Post Data”:

  1. Check content doesn’t exceed WordPress limits
  2. Remove any unsupported formatting
  3. Try publishing as draft first

“Connection Timeout”:

  1. Your WordPress server may be slow
  2. Try again in a few minutes
  3. For self-hosted: check server performance

Token Expired

If connection shows “Expired”:

  1. Click Reconnect
  2. Re-authorize with WordPress
  3. Connection is restored

Token expiration varies:

  • WordPress.com: Tokens rarely expire
  • Self-hosted: Depends on configuration

Content Issues

“Formatting Looks Wrong”:

  1. Check your WordPress theme’s styling
  2. Some formatting may need theme CSS
  3. Review in WordPress editor and adjust

“Categories/Tags Not Applied”:

  1. Verify categories exist in WordPress
  2. Create categories before publishing
  3. Check spelling matches exactly

Security & Privacy

Permissions Requested

Asky requests:

  • Create and edit posts
  • Create and edit pages
  • Read site information

We do not access:

  • User management
  • Plugin or theme settings
  • Database or files beyond posts
  • Comments or other content

Data Flow

  • Content flows one direction: Asky → WordPress
  • We don’t import WordPress content
  • Published content exists independently in WordPress

Best Practices

  1. Test with draft: Publish as draft first to verify formatting
  2. Review in WordPress: Check formatting matches your theme
  3. Use categories: Organize content with categories
  4. Set featured images: Add in WordPress after publishing
  5. SEO plugins: Configure SEO settings in WordPress after publishing

WooCommerce Note

Currently, Asky publishes to WordPress posts and pages only. Product publishing for WooCommerce is not yet supported.

Multisite Support

For WordPress Multisite:

  • Connect to individual sites in the network
  • Each site requires separate connection
  • Network admin can manage all connections

Limitations

AspectLimitation
Post typesPosts and Pages only
ImagesFeatured images coming soon
Custom fieldsNot currently supported
Bulk publishOne item at a time
WooCommerceProducts not supported

Next Steps

  • Connect Webflow for additional publishing
Last updated on