I use ACF plugin to add custom post type . but there is a three diffrent sections in my code In first add the main title like our service and in second secton add service items and in third there is a read more button for more service items. How can i solve this. my service items is successfully dynamic but main title and readmore button cant understand how can make dynamic. My code is there :

/assets/images/head.png" alt="#"/> Our Services

'services',); $service_query = new WP_Query( $ser ); if(have_posts() ) : while($service_query->have_posts() ) : $service_query->the_post(); ?> /assets/images/thr.png" alt="#"/>-->

Read More

enter image description here

  • ACF doesn't create custom post types, it creates custom fields. Can you clarify your question a bit? What is it you mean by section, service items, etc, and why are you using WP_Query?
    – WebElaine
    Feb 26, 2020 at 15:20
  • I used the ACF plugin and Custom post type ui plugin. I craete a custom post through the Custom post type ui plugin . I attach a file screenshort
    – Ruby
    Feb 27, 2020 at 4:27

1 Answer 1


The questions seem quite confusing but hope this helps you.

  • If you want to render the main title - use <?php get_the_title(); ?>this help you render the post title.
  • For rendering the post link (permalink) - use <?php echo get_permalink($post->ID);?>
  • For rendering fiedls created through ACF use - <?php echo the_field('slug_of field');?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.