• jpkeisala

    (@jpkeisala)


    I am trying to remove “read more link” from the content.
    If I write
    <?php the_content(”); ?>

    it still outputs -> < a href=”whatever/?p=26#more-26″ > < /a >

    How can I totally remove it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Kafkaesqui

    (@kafkaesqui)

    Would take a tiny edit to the WP source to get what you’re looking for. In wp-includes/template-functions-post.php look for the function get_the_content(), and in there find the line:

    if (count($content)>1) {

    Change it to:

    if ($more_link_text && count($content)>1) {

    Even with such a small alteration, remember when editing source files to back up any you change, and comment your changes.

    fallingj

    (@fallingj)

    That solution works well, Kafkaesqui. Thanks.

    The only problem is the error messages in WordPress admin:

    blockquoteWarning: Cannot modify header information – headers already sent by (output started at /home/abcd/public_html/blog/wp-includes/template-functions-post.php:398) in /home/abcd/public_html/blog/wp-admin/admin.php on line 6

    Warning: Cannot modify header information – headers already sent by (output started at /home/home/abcd/public_html/blog/wp-includes/template-functions-post.php:398) in /home/abcd/public_html/blog/wp-admin/admin.php on line 7

    Warning: Cannot modify header information – headers already sent by (output started at /home/abcd/public_html/blog/wp-includes/template-functions-post.php:398) in /home/abcd/public_html/blog/wp-admin/admin.php on line 8

    Warning: Cannot modify header information – headers already sent by (output started at /homehome/abcd/public_html/blog/wp-includes/template-functions-post.php:398) in /home/abcd/public_html/blog/wp-admin/admin.php on line 9/blockquote

    I can still edit things in admin.

    But as soon as I edit information in the header file and save, it takes me to a page that is blank but for the error messages. Seems to work, though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I remove more_link_text?’ is closed to new replies.