custom post type problem in mobile plugin

Posted in: Newspaper
Post count: 101

hi i want to use this codes for custom types. http://www.muhendisbeyinler.net/haberler/elon-musk-marsi-kolonilestirme-planlarini-acikladi/

but mobile plugin direct this homepage. Why?

//custom post type
function create_posttype() {

register_post_type( ‘haberler’,
// CPT Options
array(
‘labels’ => array(
‘name’ => __( ‘Haberler’ ),
‘singular_name’ => __( ‘Haberler’ )
),
‘public’ => true,
‘has_archive’ => true,
‘rewrite’ => array(‘slug’ => ‘haberler’),
)
);
}
add_action( ‘init’, ‘create_posttype’ );
//custom post type

Post count: 22421

Hello,
We have not tested our mobile theme with custom post types for the moment so I cannot say for sure if it will work with every post type you create. Try to see if your post type works without the mobile theme first.
Thank you.

Post count: 32

I have the same problem. My custom post type function is like this:

 $args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true, 
    'show_in_menu' => true, 
    'show_in_admin_bar' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'news' ),
    'capability_type' => 'post',
    'has_archive' => true, 
    'hierarchical' => false,
    'menu_position' => 5,
    'menu_icon'   => 'dashicons-rss',
    'taxonomies' => array( 'post_tag' ),
    'exclude_from_search' => false,
    'supports' => array( 'title', 'editor', 'comments', 'thumbnail', 'author' ) // 'comments' depricated
  ); 

  register_post_type( 'outside', $args );
}
add_action( 'init', 'outside_custom_init' );

They do work on Desktop, but not on mobile (redirecting to homepage):
https://magazeta.com/news/ofo-moscow/
https://magazeta.com/news/alipay-microapps/

  • This reply was modified 8 years by mayuxi.
Post count: 20688

Hi,


@mayuxi
Replied in your other topic.

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.