Support

Account

Home Forums Front-end Issues ACF new group, but see page 'not found'

Solving

ACF new group, but see page 'not found'

  • Hi,

    We have used ACF for a few things and it works grat.

    I am working on adding new group. I have created Field Groups, added menu to WP admin in custom.php:

      $labels_promise = array(
        'name'               => 'Obietnice wyborcze',
        'singular_name'      => 'Wpis',
        'menu_name'          => 'Obietnice wyborcze',
        'name_admin_bar'     => 'Obietnice wyborcze',
        'add_new'            => 'Nowy wpis',
        'add_new_item'       => 'Dodaj nowy wpis',
        'new_item'           => 'Nowy wpis',
        'edit_item'          => 'Edytuj wpis',
        'view_item'          => 'Zobacz wpis',
        'all_items'          => 'Wszystkie wpisy',
        'search_items'       => 'Szukaj wpisy',
        'not_found'          => 'Nie znaleziono wpisów',
        'not_found_in_trash' => 'Nie ma żadnych wpisów w koszu',
      );
    
      $args_promise = array(
        'labels'             => $labels_promise,
        'public'             => true,
        'publicly_queryable' => true,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'query_var'          => true,
        'rewrite'            => array( 'slug' => 'obietnicewyborcze' ),
        'capability_type'    => 'post',
        'has_archive'        => true,
        'hierarchical'       => false,
        'menu_position'      => 5,
        'menu_icon'      => $themeUri . '/assets/img/ico-chat.png',
        'supports'           => array( 'title', 'editor', 'author', 'thumbnail', 'comments'),
        'show_in_nav_menus'  => true,
        'taxonomies'         => array('post_tag')
      );

    And registered new Field Group in custom.php:
    register_post_type( 'dmg_promise', $args_promise );

    I added 2 posts. I created archive-dmg_promise.php, page-promise.php (to show all posts on the page), single-dmg_promise.php and content-promise.php.

    archive-dmg_promise.php:
    <?php get_template_part('templates/page', 'promise'); ?>

    Unfortunately, when I go to beta.demagog.org.pl/obietnicewyborcze/ (the slug mentioned in ‘rewrite’; the web is protected by password, you will not enter the site) I see “not found”.

    Any ideas where should to look for an answer?

    Regards,
    Jakub

  • The 404 you’re seeing has nothing to do with ACF. It has to do with your CPT settings. Try updating your permalink settings.

  • Hi John,

    It seems my wordpress didn’t refresh the website (cacheing works for long time on this WP installation)…

    Now it works like a charm!

    Regards,
    Jakub

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.