Hi @James,
I did notice that the image I am uploading with ACF is not being registered. I am grabbing the field of the image as shown in the code above but when I view source on the page, the image is no where to be seen, whats up with that?
<button type="button" class="btn btn-raised" data-toggle="modal" data-target="#myModal">Cert 1</button>
<div id="myModal1" class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-simple" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
awesome! thanks James!
Hi @jonathan,
I noticed that just as I saw your post!! That definitely fixed it! Thank you!
Hey @jonathan thanks for your advice. My inspect console doesnt say anything and there are no errors.
I took your advice and changed up my functions.php to look like this:
function theme_styles() {
wp_enqueue_style( 'theme-material-icons', '//fonts.googleapis.com/icon?family=Material+Icons', array(), '1.0.0' );
wp_enqueue_style( 'theme-roboto-font', '//fonts.googleapis.com/css?family=Roboto:300,400,500,700', array(), '1.0.0' );
wp_enqueue_script( 'theme-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '1.0.0', true );
wp_enqueue_script( 'theme-material', get_template_directory_uri() . '/js/material.min.js', '1.0.0', true );
wp_enqueue_script( 'theme-material-kit', get_template_directory_uri() . '/js/material-kit.js', '1.0.0', true );
wp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/font-awesome/css/font-awesome.css');
wp_enqueue_style( 'slick_css', '//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.css' );
// wp_enqueue_style( 'theme-slickcsstheme', get_stylesheet_directory_uri(). '/css/slick-theme.css', '1.6.0', 'all');
wp_enqueue_script( 'slick_js', '//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.min.js', array('jquery'), '', true );
wp_enqueue_script( 'theme-slickjs-init', get_template_directory_uri(). '/js/slick-init.js', array( 'jquery','slickjs' ));
}
add_action('wp_enqueue_scripts', 'theme_styles');
And I checked the console network, the scripts are being delivered, however, the very last script: slickjs-init is not? Do you have any idea why? My styles.css is being delivered as well. It has my css for the arrows etc but they dont seem to work. Everything else seems to be styled just fine.
@hbroccoli yes I added it, as shown below.
<div class="fill" style="width: 1900px; height: 1080px; background-image: url(<?php the_sub_field('image');?>);"></div>
But now my carousel doesnt move left or right. its stuck on the one image. When I view source my code shows up as seen below:
<div class="carousel-inner">
<div class="item active">
<div class="fill" style="width: 1900px; height: 1080px; background-image: url(http://vagrantpress.dev/wp-content/uploads/2016/08/Wallpapersxl-Waterfall-Fanatsy-Landscape-From-Fantasy-738628-1900x1080.jpg);"></div>
<div class="item ">
<div class="fill" style="width: 1900px; height: 1080px; background-image: url(http://vagrantpress.dev/wp-content/uploads/2016/08/Wallpapersxl-Waterfall-Fanatsy-Landscape-From-Fantasy-738628-1900x1080.jpg);"></div>
<div class="item ">
<div class="fill" style="width: 1900px; height: 1080px; background-image: url(http://vagrantpress.dev/wp-content/uploads/2016/08/Wallpapersxl-Waterfall-Fanatsy-Landscape-From-Fantasy-738628-1900x1080.jpg);"></div>
</div>
Which seems exactly like my html above.
@hbroccoli I believe I set the return type of the image field as URL, not Array. When I view source when previewing the site, the url field in the html has the appropriate url with the image I just uploaded.
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?
— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.