Having the exact same problem as @Hjalmar on Advanced Custom Fields, but still no fix. Only the URL text displays. Tried the original ACF oembed option: <div class="embed-container"> <?php echo get_field('video_embedd'); ?> </div> No luck. Placed the YouTube embed URL in the ACF text field and outputting it into an HTML iframe: <?php $videoEmbeddPlease = get_field('video_embedd'); if (!empty($videoEmbeddPlease)): ?> <iframe width="560" height="315" src="<?php echo $videoEmbeddPlease?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> <?php endif ?> No luck. Even tried the Advanced ACF example: <?php // get iframe HTML $iframe = get_field('video_embedd'); // use preg_match to find iframe src preg_match('/src="(.+?)"/', $iframe, $matches); $src = $matches; // add extra params to iframe src $params = array( 'controls' => 0, 'hd' => 1, 'autohide' … [Read more...] about Advanced Custom Fields oembed only outputs YouTube URL
Advanced custom fields
I have one page lets call it page-home.php and I also have a page called page-custom-field.php I want to have a section of the first page where it loops through page-custom-field.php page and display it on itself. Here is my code attempting that so far. I am using advanced custom fields on the second page. My If statements page-home.php <?php $args = array( 'post_type' => array( 'features' ), 'posts_per_page' => 1, ); $query = new WP_Query( $args ); ?> <div id="homeSpecials" class="section__content small-12 small-centered medium-10 columns"> <?php if($query -> have_posts()) : while( $query->have_posts() ) : $query->the_post(); ?> <?php include 'page-custom-field.php' ?> <?php endwhile; endif;//ends'menu_flexible'?> page-custom-field.php <?php if( have_rows('menu_item') ): ?> <?php while( have_rows('menu_item') ): the_row(); ?> <!-- loop through the rows of data || DONT CLOSE THE LOOP IN AN 'IF' STATEMENT --> <?php … [Read more...] about How do I go about looping through a advanced custom field on a particular page inside of another page
Im using css-grid with underscores bare bones theme and am currently stuck on how to get the default custom fields wordpress offers to appear when I'm adding a post, or in the Screen Options tab in all posts page. I am using the latest oversion of WordPress and am not a coder, I had installed Advanced Custom Fields but have uninstalled it to use the default custom fields, but as that made no difference have reinstalled ACF since. I have the gutenberg editor and I don't know how to switch back to the old editor or if thats even possible anymore. … [Read more...] about How to regain default custom fields? advanced custom fields already uninstalled
I created a couple of custom fields using Advanced custom fields plugin. Latitude and longitude. Now I need to query for posts where post title is equal to a criteria and by the custom fields latitude and longitude. I need to query this in mysql client. I am trying this select posts.* from wp_posts posts left join wp_postmeta meta on (posts.ID = meta.post_id and meta.meta_key = 'latitude' and meta.meta_value = '56.xxxxxxx' and meta.meta_key = 'longitude' and meta.meta_value = '-2.xxxxxxx') where posts.post_type = 'location' and posts.post_title = 'Some criteria'; This query return the row but only takes the post_title into account because if I change the values of latitude and longitude it always returns the same row. I also try this query select posts.* from wp_posts posts left join wp_postmeta meta on posts.ID = meta.post_id where posts.post_type = 'location' and posts.post_title = 'Some criteria' and meta.meta_key = 'latitude' and meta.meta_value = '56.xxxxxxx' and … [Read more...] about How to query posts by custom fields created with advanced custom fields plugin?
Sarah Gooding August 9, 2018 3 The Advanced Custom Fields (ACF) team published an announcement today, assuring users that Gutenberg compatibility is in the works and will be available in version 5.0 of the free version in September 2018. The plugin, created by Elliot Condon, makes it easy for developers to add custom fields to WordPress edit screens, including posts, users, taxonomy terms, and media. ACF is widely used with more than a million active installations. Developers have been concerned about whether or not their custom fields would continue to work on their clients’ websites after the new editor makes its debut in WordPress 5.0. Gutenberg treats legacy metaboxes as second class citizens in the interface, stuffed at the bottom of the new edit screen. Metaboxes should, however, continue to work as expected. The ACF announcement lets developers know what to expect for how their metaboxes will appear inside Gutenberg: By default, our beloved metaboxes are pushed … [Read more...] about Advanced Custom Fields to Add Gutenberg Compatibility in Version 5.0, Slated for September