Home › Forums › Backend Issues (wp-admin) › 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>
<h4>2. How to Apply:</h4>
<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
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.