WordPress per ACF – permalink is not working

get_the_permalink() returns the permalink as a string and doesn’t echo it. You either need to echo this yourself <?php echo get_the_permalink(); ?> as you’ve got in some of your other <?php tags, or you can use the helper function the_permalink() which does echo <?php the_permalink(); ?> the same pattern as you’ve used for the_title(). Note … Read more

Add up all numbers from a WordPress query [closed]

.= does string concatention, eg, ‘hello ‘ . ‘world’ gets you hello world. To add, use + instead of .: // Set a default for $numbers. $numbers = 0; $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $post_id = get_the_ID(); $party_size = get_field(‘reservation_party_size’, $post_id); $numbers += intval( $party_size ); } } return … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)