wordpress – tworzenie strony archiwum
-
W wordpress tworzę swój temat.
Mam plik posttypes.php, w którym mam swój typ.
Stworzyłem plik archive-mojtyp.phpale strona po adresem http://localhost/wordpress/mojtyp nie działa.
Mógłby mi ktoś wytłumaczyć co robię źle?Plik posttypes
<?php add_action('init','page_init_posttypes'); function page_init_posttypes() { /* Rejestrujemy newsy */ $news_args = array( 'labels' => array( 'name' => 'Newsy', 'singular_name' => 'Newsy', 'all_items' => 'Wszystkie newsy', 'add_ned' => 'Dodaj news', 'add_new_item' => 'Dodaj news', 'edit_item' => 'Edytuj news', 'new_item' => 'Nowy news', 'view_item' => 'Zobacz news', 'search_items' => 'Szukaj w newsach', 'not found' => 'Nie znaleziono', 'not_found_in_trash' => 'Brak newsow w koszu', 'parent_item_colon' => ' ' ), 'public' => true, 'public_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => 5, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'custom-fields', 'post-formats' ), 'has_archive' => true ); register_post_type('news', $news_args); } ?>
Plik archive-mojtyp.php
<?php get_header(); ?> <?php echo 'test' ?> <?php get_footer(); ?>
pracuję aktualnie na localhost na wamp
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- Temat ‘wordpress – tworzenie strony archiwum’ jest zamknięty na nowe odpowiedzi.