Home › Forums › General Issues › How to create Subtitle for each post with ACF › Reply To: How to create Subtitle for each post with ACF
Yes, i put in theme file – under this line:
<?php the_title( ‘<h1 class=”entry-title” ‘ . hybrid_get_attr( ‘entry-title’ ) . ‘>’, ‘</h1>’ ); ?>
….. put your code here….
now for your below comment:
“From what it looks like you put the code into the “Content” WYSIWYG editor for the page. PHP code cannot be edited there. This is why I gave you the link to the shortcode documentation for ACF.”
Your understanding is wrong.
now let me tell you what i did.
1. Install ACF
2. Create Group – check screenshot.
3. Put your code in single-content.php under the same line that you are talking.
4. Create new post – new post has option to put the value for subtitle.
5. I put “This is testing subtitle”
6. Published the post.
Now, post has the code as subtitle instead of what i put in subtitle field.
Please give me correct code, so that i have put on subtitle field that value in the post.
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.