Support » Fixing WordPress » Allow links in posts displayed on homepage

  • Hi

    I have enabled my homepage to display blog posts. Some of the posts however have links, but these are disabled on the homepage. Any way to enable them? I was reading about the “the_content_rss” method and thought changing it would solve my problem, but no luck. It is as follows:

    <?php the_content_rss(”, TRUE, ”, 37); ?>

    There is supposed to be a fifth parameter, encode_html, that I thought would enable links, but that didn’t seem to work either, unless something else went wrong. Any advice would be greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Your theme may be using <?php the_excerpt();?> instead of <?php the_content();?> in the home page template file. Simply edit the relevant template file and replace <?php the_excerpt();?> with <?php the_content();?>.

    Thread Starter philbonsai

    (@philbonsai)

    @esmi,

    Thanks for the response! Unfortunately, I am looking at my theme’s index.php file and there is no the_excerpt() usage. Here’s the pertinent code for posts:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class(); ?>>
    <?php include("firstimage.php"); ?>
    <?php include("thumbnail.php"); ?>
    <h2 class="posttitle">
         <a href="<?php the_permalink() ?>" rel="bookmark"
         title="Permanent Link to <?php the_title_attribute(); ?>"><?php
         the_title(); ?></a>
    </h2>
    <small class="postMeta">
         <span class="time"><?php the_time('F j, Y') ?></span>
         &nbsp;&nbsp;
         <span class="authorLink">
              <?php the_author_posts_link(); ?>
         </span>
         &nbsp;&nbsp;
         <span class="commentLink">
               <?php comments_popup_link('No Comments', '1 Comment', '%
               Comments'); ?>
         </span>
    </small>
    <p><?php the_content_rss('', TRUE, '', 37); ?> </p>
    <span class="button alignright">
         <a href="<?php the_permalink() ?>">Continue Reading</a>
    </span>

    Thanks for any additional insight.

    @esmi, your advice worked for me, thanks a lot.

    I just found that there are even plugins available to handle excerpt , @philbonsai you can use any of those plugins and see whether it solves the problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allow links in posts displayed on homepage’ is closed to new replies.