WordPress page not showing up – replaced with last 10 posts?

The problem is with the rewrite rules generated with the post type- they’re a bit greedy and are capturing those requests. WordPress is trying to query for a matching category_type, which isn’t actually an object type, and in the absence of any other valid query argument, it runs the main blog query. You could manually … Read more

plugin_dir_url(__FILE__) searches parent theme in ACF extension

I’m a total dummy. Looked through the field file and found this: function input_admin_enqueue_scripts() { // Note: This function can be removed if not used // register acf scripts wp_register_script(‘acf-input-column’, $this->settings[‘dir’] . ‘js/input.js’, array(‘acf-input’), $this->settings[‘version’]); wp_register_style(‘acf-input-column’, $this->settings[‘dir’] . ‘css/input.css’, array(‘acf-input’), $this->settings[‘version’]); // scripts wp_enqueue_script(array( ‘acf-input-column’, )); // styles wp_enqueue_style(array( ‘acf-input-column’, )); } $settings->[‘dir’] was set … Read more

ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]

Ok I figured it out! The setup is a little different but it works great. PHP / HTML Working Code <section class=”dev-slider-wrppr”> <div class=”dev-slider-row”> <div class=”slider-for”> <?php if( have_rows(‘slider_content’) ): ?> <?php while( have_rows(‘slider_content’) ): the_row(); ?> <?php $slideimage = get_sub_field(‘slider_image’); $slidetitle = get_sub_field(‘slider_title’); $slidebdycpy = get_sub_field(‘slider_body_copy’); ?> <div class=”slick-container”> <h4 class=”info-title text-center”><?php echo $slidetitle; … Read more

Can’t get ACF repeater data in category template

Finally found this solution on the ACF support forums. All I had to do was add this to my functions.php file in my custom theme: //Include CPT In Categories Pages function namespace_add_custom_types( $query ) { if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) { $post_types = get_post_types( ”, ‘names’ ); $query->set( ‘post_type’, $post_types); return … Read more

How can I save a Custom Post Title and Slug with a Custom Field?

I found some code that allows both Post Title and Slug to be generated from custom field data: function recipe_update_title( $value, $post_id, $field ) { $new_title = get_field( ‘recipe_name’, $post_id) . ‘ ‘ . $value; $new_slug = sanitize_title( $new_title ); // update post $recipe_postdata = array( ‘ID’ => $post_id, ‘post_title’ => $new_title, ‘post_name’ => $new_slug, … Read more