webdev.ramyash@gmail.com

Web Development


PHP, MySql, JQuery, Ajax,Wordpress,Woocommerce,HTML,CSS,JavaScript,DOM,jQuery,PHP,SQL,XML,Bootstrap,Web

Thumbnail support custom post type wordpress.





Create custom post type wordpress

<?php
function create_post_type() {
  register_post_type( 'test_posttype',
    array(
      'labels' => array(
        'name' => __( 'Test' ),
        'singular_name' => __( 'Test' )
      ),
      'public' => true,
      'has_archive' => true,
      'rewrite' => array('slug' => 'Test'),
    )
  );
}
add_action( 'init', 'create_post_type' );

?>
Create custom post type wordpress

Get theme path in wordpress.

<?php
 echo get_template_directory_uri();
 ?>

Get theme path in wordpress

Display Menus on Theme in wordpress.

<?php
wp_nav_menu( array( 'theme_location' => 'test' ) );

?>


Display Menus on Theme in wordpress.

Register nav menu in wordpress

Add in functions.php


<?php
add_action( 'after_setup_theme', 'register_my_menu' );
function register_my_menu() {
  register_nav_menu( 'test', __( 'Test Menu', 'theme-slug' ) );
}
?>
Register nav menu in wordpress

Create page templates in wordpress.

<?php

/**
 * Template Name: PHP-AJAX-HTML
 *
 */

get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

Yes It's working fine.

</main><!-- .site-main -->
</div><!-- .content-area -->

<?php get_footer(); ?>


Create page templates in wordpress