Support

Account

Home Forums Backend Issues (wp-admin) Custom Fields as Excerpt + read more option

Unread

Custom Fields as Excerpt + read more option

  • Hi Everyone,

    I have looked for similar issues but since I am new to this I could not find a solution in the forum for the issue I am having.

    I have a template that uses the Read More option to create the excerpts, so when I am creating a single post all I need to do is insert the more code and it will automatically create the excerpt. However, I am not using single post creation, I am using the ACF to upload bulk posts and I managed to edit the template to do this but I have not been able to include the Summary part as an excerpt as I have not find where to modify the template to get this done.

    This is the current code where I included the acf fields:

    the_content(
    sprintf(
    __( ‘Read More’, ‘cozipress’ ),
    ‘<span class=”screen-reader-text”> ‘.esc_html(get_the_title()).'</span>’
    )
    );
    ?>
    <h4>Summary:</h4>
    <b>Country:</b> <?php echo get_field(‘location’); ?><br>
    <b>Duration:</b> <?php echo get_field(‘duration’); ?><br>
    <b>Start Date:</b> <?php echo get_field(‘start_date’); ?><br>
    <b>Deadline:</b> <?php echo get_field(‘Deadline’); ?><br>
    <b>Award:</b> <?php echo get_field(‘award’); ?><br><p> </p>
    <p><!–more Read More–></p>

    <h4>1.Eligibility Criteria:</h4>

    • <b>Eligible Countries:</b> <?php echo get_field(‘eligible_countries’); ?>
    • <b>Acceptable Course or Subjects:</b> <?php echo get_field(‘acceptable_course’); ?>
    • <b>Admissible Criteria:</b> <?php echo get_field(‘admissible_criteria’); ?>
    • <b>Required Documents:</b> <?php echo get_field(‘required_documents’); ?>

    <h4>2. How to Apply:</h4>

    • <?php echo get_field(‘how_to_apply’); ?>

    <h4>3. Benefits:</h4>
    <?php echo get_field(‘benefits’); ?><br>
    <p> </p>

    I would like the excerpt to be the portion where it starts with Summary and ends with the code <p><!–more Read More–></p>.

    Can anyone help me identify what is wrong with this. This is the site in case you want to see online http://www.easilyabroad.com Thanks in advance

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.