# Adding Affiliate Links on Posts/Pages

## Adding Affiliate Links to Post/Page

Currently, you can add affiliate links to pages and post using two ways

* **Short code** - You can copy the short code from manage affiliate links and paste it on your post or page in classic editor or Gutenberg editor, please refer to the example below.
  * \[aa\_link id=7] Will create a link with title as 'example affiliate link'
  * \[aa\_link id=7]new title\[/aa\_link] if content is provided in between shortcode the link title will be set to new 'new title'
* **Gutenberg Rich text toolbar** - When you type in Gutenberg a text box editor popup appears click on the arrow button and then click on Affiliate Link which contains WPAdCenter Logo in it refer to the screenshots below

![](/files/-MduFdbnH71JaLH5MC9W)

after clicking on it, a popover appears where you can select the affiliate links which you have created refer the screenshot below

![popover with select box to select link](/files/-MduGlFM1J912bVOOco4)

please note the cursor in above example currently it's blank which means when you apply a link to it the title would be what you have provided in affiliate link post type (refer the screenshot below). but if you have a selected a word, the link will be attached to the word itself.

![newly generated affiliate link](/files/-MduHR_JCla6ULPnYEUx)

You could also delete it using the delete button provided on the popover link will be deleted in that case not the text.

![link in the front-end post](/files/-MduIGrM5y3JEU8o7c2n)

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wpeka.com/wp-adcenter/affiliate-link-management-pro/adding-affiliate-links-on-posts-pages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
