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 is a way to convert <!-- more --> to shortcode

share|improve this question
Can you give more details? What do you hope to achieve with this? – cpilko Apr 27 '12 at 16:46
i use a plugin to replace text if a word is found and want to replace this word with more tag – Amr Salah Shalaby Apr 27 '12 at 16:50
up vote 2 down vote accepted

Try adding this to your plugin file (or functions.php). You'll use [my_more] as the shortcode for this example.

function wpse50449_more_func( $atts ){
 return "\n<!-- more -->\n";
add_shortcode( 'my_more', 'wpse50449_more_func' );
share|improve this answer
not work may be it need to replace <!--more--> with call it's function – Amr Salah Shalaby Apr 27 '12 at 18:08
That will give you <!--more--> from a shortcode. More information about what you're actually trying to accomplish with this would get you a better answer. – cpilko Apr 27 '12 at 18:38
THX alot i fix it – Amr Salah Shalaby Apr 27 '12 at 19:00
Updated your code with prefixing for purposes of best practice. +1 – mor7ifer Apr 29 '12 at 22:37

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.