Milonsinha

wordpress cheat seat corlate class 4

Jul 28th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. despret 2
  2. ==================================
  3. 1.<?php get_header();?> =header.php file call korar jonno--header alada korar por
  4. 2.<?php get_footer();?> =footer.php file call korar jonno---footer alada korar por
  5. 3.functions.php
  6. =====================
  7. //register nav menu mane holo headerer menu
  8.  
  9. function corlate_theme_menus(){
  10. register_nav_menus(array(
  11. 'main_menu' => 'Main Menu',
  12. 'footer_menu' => 'footer Menu'
  13.  
  14. ));
  15. }
  16. add_action('init', 'corlate_theme_menus');
  17. 4.function.php
  18. ====================
  19. //header menu theke page gulare automatic menu hisebe anar jonno ai code achara header.php te menur class ta ber kore nicher php code ta location hisebe dite hobe bass...aar themercorlate themer onno menu gula kete dlm
  20.  
  21.  
  22. function corlate_theme_default_menu() {
  23. echo '<ul class="nav navbar-nav">';
  24. if('page' != get_option('show_on_front')) {
  25. echo '<li><a href="'.home_url() .'/">Home</a></li>';
  26. }
  27. wp_list_pages('title_li=');
  28. echo '</ul>';
  29. }
  30. header.php
  31. ===============
  32. <?php wp_nav_menu(array(
  33. 'theme_location' => 'main-menu',
  34. 'menu_class' => 'nav navbar-nav',
  35. 'fallback_cb'=> 'corlate_theme_default_menu',
  36. )); ?>
  37.  
  38. 5.index.php ke copy kore template-welcome.php
  39. template-welcome.php
  40. =========================
  41. <?php
  42. /*
  43. template name: welcome template
  44. */
  45. get_header();?>
  46. 6.then 2 ta page creat korci..Home and Blog...sathe template-welcome set kore dici...then setting theke front page home and post page blog select kore dici
  47. 7.tarpor themer about_us.html ke rename kore page.php kore dici...tarpor header and footer call kore kete dici and pger onno lekhao kete dici sob.
  48. 8.page.php
  49. ===============
  50. <section id="about-us">
  51. <div class="container">
  52.  
  53. <div class="col-md-12">
  54.  
  55.  
  56. <?php if(have_posts()): ?>
  57. <?php while (have_posts()) : the_post(); ?>
  58.  
  59. <h2><?php the_title(); ?></h2>
  60. <?php the_content(); ?>
  61. <?php comments_template('',true); ?>
  62.  
  63. <?php endwhile; ?>
  64. <?php else : ?>
  65. <h3><?php _e('404 Error&#58; Not Found'); ?></h3>
  66. <?php endif; ?>
  67. </div>
  68. </div><!--/.container-->
  69. </section><!--/about-us-->
Add Comment
Please, Sign In to add comment