Add routes between multiple ACF google maps markers [closed]

I’ve managed to work around this by using Gmaps.js. function initMap($el) { var bounds = []; var waypts = []; var $markers = $($el).find(‘.marker’); var map = new GMaps({ div: $el, scrollwheel: false, zoomControl : true, zoomControlOpt: { style: ‘LARGE’, position: ‘TOP_RIGHT’ }, panControlOpt: { position: ‘TOP_RIGHT’ } }); $markers.each(function() { // DEFINE CURRENT/NEXT MARKER … Read more

ACF field not appearing correctly in loop

Insert the post ID in the_field function. See the documentation. <?php the_field($field_name, $post_id); ?> $field_name: the name of the field to be retrieved. eg “page_content” (required) $post_id: Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc So in … Read more

Displaying page list and a custom field

From what I see there, I’d expect that your problem is the meta value in story_detail_story_image is storing an image id. Try replacing the following <?php if ( get_post_meta( get_the_ID(), ‘story_detail_story_image’, true ) ) : ?> <a href=”https://wordpress.stackexchange.com/questions/177610/<?php the_permalink() ?>” rel=”bookmark”> <img class=”thumb” src=”<?php echo get_post_meta( get_the_ID(), ‘story_detail_story_image’, true ); ?>” alt=”<?php the_title(); ?>” /> … Read more

Can’t get the_content to show

You never start the main loop: <?php if (have_posts()) : ?> <h1 class=”pricing”>Prices</h1> <h2><?php the_title(); ?></h2> <?php the_content(); ?> You check if there are posts in the main query, but you never start the loop, and jump straight to showing the title and content, you need to move everything into a main post loop. Without … Read more

Issue in If else condition [closed]

Try to replace the following: <?php $sectyp = array( ‘meta_query’ => array( array( ‘key’ => ‘section_type’, // selecting the section type “Normal” or “Parallax” ‘value’ => ‘Parallax’ ), ), ); ?> with <?php $sectyp = get_post_meta(get_the_ID(), ‘section_type’, true); ?> and replace <?php if($sectyp) { ?> with <?php if($sectyp == “Parallax”) { ?>

Advanced Custom Fields – Add Field to Specific Page [closed]

You have two options. Either use get_field or the_field. get_field just reads out the field from the db without and screenoutput. like you did in your first line: $fields = get_field(‘testimonial’); the_field instead is get_field with an implied echo. <?php the_field(‘testimonial’); ?> so basically the_field would be enough. Aside you have to write a wp_query … Read more