Support » Fixing WordPress » Using predefined text in new posts

Viewing 15 replies - 1 through 15 (of 18 total)
  • Put your code in backsticks (see the lines below the text area when you write your post here!) and then maybe we will understand what you are asking.

    Hmm, lets see, here goes…(sorry for that)

    <a target="_blank" href="">
    <img src="http://dinobaby.net/wp-content/" alt="Bods">
    Text</a> From <a href="http://www.bodsforthemods.com " target="_blank">Bodsforthemods</a>

    It is possible.
    Depending on what is set in your Options > Write, i.e simple or advanced controls, you can edit the edit-form.php or the edit-form-advanced in the wp-admin folder, by inserting your text in the textarea div. (Or you can do it in both files.) In the advanced form it would be around line 100.

    What should I be looking for? i am really not good with php so I´m kinda lost here :S

    It has nothing to do with php. Just do what wrote in my previous post.
    In a text editor open the files, e.g. wp-admin/edit-form-advanced.php and go the the line 100. It will look something like this:

    <div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="5" id="content"><?php echo $content ?></textarea></div>

    then copy your text and insert it like this:

    <div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="5" id="content"><?php echo $content ?><a target="_blank" href=""><img src="http://dinobaby.net/wp-content/" alt="Bods">
    Text</a> From <a href="http://www.bodsforthemods.com " target="_blank">Bodsforthemods</a>
    </textarea></div>

    Save the file. You can do the same thing in the edit-form.php if you are using the simple control for writing posts.

    That did it Moshu!!! 🙂
    Thank you very much for your help and your patience, but hey! I´m a bit wiser just now!!

    Thans again

    Glad it worked out 🙂
    Have fun!

    alright this is sort of related… *some* of my posts have very similar set-up.. is there a way to have different templates for different sorts of posts?

    That is an excellent solution moshu.

    Is it somehow possible only put a predefined text into this textbox if it is still empty?

    Many thanks

    I am not sure I understand your question.
    On the other hand, now that I am more familiar with WP I wouldn’t recommend altering the core files… I’d rather go with a quicktag solution.
    See the tutorial about how to do this:
    http://www.tamba2.org.uk/wordpress/quicktags/

    Your solution is the best way for my purposes, since there is no click necessary at all.

    The only problem with your solution is, that every time as the user edits the post the hardcoded text will be added again.

    Oh, I see… I’ve never thought about that 🙂
    I guess there should be some coding trickery for that… but I am not a coder guy 🙁

    oda lehet betenni egy if-et?

    há’ tudom én? – kódoláshoz annyit értek, mint ló az ábécéhez 🙂

    O.k. Thanks anyway.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Using predefined text in new posts’ is closed to new replies.