Help > Shortcode

[button]

Login

You must be logged to see this page.

Role

Display a button with a link to a specific element or external url.

Name

[button]

Attributes

id Default: none

Value : the page/post/faq/team/media id to link to.
e.a : id=”18″

text Default: none

Value : the text displayed in frontend.
e.a : text=”click here to see the pdf”

url Default: none

Value : the url to link to
e.a : url=”https://vanois.be”

newtab Default: none

Value : yes
e.a : newtab=”yes”

Usage

[button] Won’t return anything
[button id="12" text="Clic here"] Will return a Clic here button with a link to the page/post/faq/team/media with id 12 which will open in the same browser tab.
[button url="https://vanois.be" text="A cool wordpress developper" newtab="yes"] Will return a A cool wordpress developper button with a link to https://vanois.be which will open in a newtab.
[list_pages id="12" url="https://vanois.be"  text="which one?"] Will return a which one? button with a link to the page/post/faq/team/media with id 12 which will open in the same browser tab. The id attribute is prior to the url.

 

Faq

Can I make a link to anything ?

Yes. Each element : page, post, faq, team member, media (photos, pdf, etc.) has a unique id.
By using the id attribute, WordPress will retrieve the correct link.
[button text="click here" id="12"] will link to the element with id 12. If it’s a page, it will be a link to the page (id:12). If it’s a pdf, it will link to the pdf (id:12). And so on….

You will find the id by browsing the page/post/faq/team/media menu.

Nothing is showned, what am i doing wrong?

You must set an id or an url in order to trigger the button in frontend. Without an id or an url to link to, the button won’t appear. For example : [button text="click here" id="12"] or [button text="click here" url="https://vanois.be"]

I just see a small green rectangle, what happens?

You must set a text attribute in order to display something. For example : [button text="click here" id="12"]

When clickin to the button, I’ve got a 404 error Page not Found

You set a link to a page which is not yet published. If you use the shortcode [button text="click here" id="12"], you must ensure that the page with id:12 is Published (not Pending or Draft) or an 404 error Page not found will occur.

Can I align the button on the right side?

The [button] shortcode is behaving like a text character. You can aligned it to the left, to the right, to the center, like any other word.

Contact

myProto
Korporaal Trésigniesstraat 6
B-1190 Brussel
België

Tel: +32 2 333 27 00
E-mail : info@myproto.eu

Lid van

Agoria FHI EDM

Sociale media

Volg ons op FacebookVolg ons op LinkedIn

Betaalwijzen visa - mastercard - maestro bank transfer - sofort - bancontact paypal

Wij versturen met TNT

Top