Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I wish to insert large posts in my site, close to 300,000 words.

I removed all bold, italics, footnotes etc. and I paste text in HTML tab of post admin editor.

My posts are truncated to 75656 words.

Is there such an upper limit on the number of words per page?

If yes, can you propose any alternative as per how to support such large posts? Maybe via CSV import?

Thanks.

share|improve this question
    
Many thanks bueltge and Unknown_Guy. Actually I need to paste long text so bueltge I d rather not hide the submit button, excellent JS method still. Unknown_Guy I guess my best best is to use CSV import. Thanks again! –  p.a. Jan 13 '12 at 7:29
    
Curiously, what are you posting that is 300,000 words in length? That is some serious reading. –  userabuser May 14 '12 at 10:23
    
Its legal documents - whole books as a matter of fact –  p.a. Sep 22 '12 at 16:12
add comment

2 Answers

You can hide the submit button, if to much words on the editor. The Editor has an id and also the button; use an small JS to realized your requirement. An example solution for the comment form can you find at the follow code and more infos on this post.

jQuery(function($) {
    // configure
    var comment_input = $( '#commentform textarea' );
    var submit_button = $( '#commentform .form-submit' );
    var comment_limit_chars = 1000;
    // stop editing here

    // display how many characters are left
    $( '<div class="comment_limit_info"><span>' + comment_limit_chars + '</span> characters left</div>' ).insertAfter( comment_input );

    comment_input.bind( 'keyup', function() {
        // calculate characters left
        var comment_length = $(this).val().length;
        var chars_left = comment_limit_chars - comment_length;

        // display characters left
        $( '.comment_limit_info span' ).html( chars_left );

        // hide submit button if too many chars were used
        if (submit_button)
            ( chars_left < 0 ) ? submit_button.hide() : submit_button.show();
    });
});

Change the IDs and classes for use the source on the editor-field. But the example count the strings, not the word; but you can count words if you count the spaces. The follow example doing this; but you must change the form_name; its the name attribut of the element, the editor-textarea or iframe.

function countWords(){
    document.form_name.wordcount.value = document.form_name.inputString.value.split(' ').length;
}
share|improve this answer
add comment

WP stores post in LONGTEXT wich is 4GB so it's not a DB limit. CSV should work. I guess pasting data directly in DB isn't an option. Another thing that comes in mind is that you can post directly from MS Word.

share|improve this answer
    
input via CSV is the best option for large documents. –  p.a. Sep 22 '12 at 16:13
add comment

Your Answer

 
discard

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.