WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to create internal anchors without using the HTML rendering option? I don't mind but I guess my customer will ;)


share|improve this question
up vote 2 down vote accepted

In the "tinyMCE Advanced" plugin has a special icon for that. The default WordPress installation don't offer the anchor icon/attribute editor.

share|improve this answer
Thanks it worked like a charm – Kaaviar Jun 8 '11 at 15:33

Here's a simple non-plugin solution, you can paste this into your functions.php :

function set_tinymce_buttons( $initArray ) {
    $initArray['theme_advanced_buttons1'] ='formatselect,|,bold,italic,underline,|,bullist,numlist,charmap,|,pastetext,pasteword,|,removeformat,|,anchor,link,unlink,|,undo,redo';
    $initArray['theme_advanced_buttons2'] = '';
    $initArray['theme_advanced_blockformats'] = 'h2,h3,h4,p';
    return $initArray;
add_filter('tiny_mce_before_init', 'set_tinymce_buttons');

With that you can set the two lines of buttons as well as the tags in the Format dropdown.

See this page for options.

share|improve this answer

Building off of mike23's answer. Here you can just append the anchor button to the wysiwyg panel.

function set_tinymce_buttons( $initArray ) {
    $initArray['theme_advanced_buttons1'] .= ',anchor';
    return $initArray;
add_filter('tiny_mce_before_init', 'set_tinymce_buttons');
share|improve this answer

you can easily create bookmarking tag just follow these steps :

  1. Set your Destination

    <h2 id="anchor"> Destination of your Anchor </h2>
  2. Make target Hyperlink

    <a href="#anchor">Click Me for check our Anchor</a>

enter image description here

please see above image for better explanation

share|improve this answer
Don't use answers to spam. Your link is totally not relevant. Do not roll back my changes, I will flag this as spam. – Pieter Goosen May 1 '15 at 7:17
Mr. Pieter first check link and then check available anchor. that all doing as i mention above ... so first check and then flag it – Anurag shreshthi May 1 '15 at 8:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.