amansdpr

wordpress cheat sheet

Jan 8th, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. <?php /*Show post author link */?> <?php the_author(); ?>
  2.  
  3.  
  4.  
  5.  
  6.  
  7. <!-- show post link --> <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  8.  
  9.  
  10.  
  11.  
  12.  
  13. <?php /** show post content */?> <?php the_content(); ?>
  14.  
  15.  
  16.  
  17. <?php /** Show edit post link */?>
  18.  
  19. <?php edit_post_link(); ?>
  20.  
  21.  
  22.  
  23.  
  24.  
  25. <!-- show the next/previous link -->
  26.  
  27.  
  28.  
  29. <?php next_posts_link( 'Older Entries' ); ?>
  30.  
  31.  
  32.  
  33. <?php previous_posts_link( 'Newer Entries' ); ?>
  34.  
  35.  
  36.  
  37.  
  38.  
  39. <!-- Comments popup link -->
  40.  
  41.  
  42.  
  43. <?php comments_popup_link( 'Leave a Comment', '1 Comment', '% Comments' ); ?>
  44.  
  45.  
  46.  
  47. <!-- Code for show blog name-->
  48.  
  49. <?php bloginfo('name'); ?>
  50.  
  51. <!-- Discription for blog -->
  52.  
  53. <?php bloginfo(’description’); ?>
  54.  
  55. <!-- The title of your blog -->
  56.  
  57. <?php wp_title(); ?>
  58.  
  59.  
  60.  
  61. <!-- code for stylesheet linking -->
  62.  
  63. <?php bloginfo('stylesheet_url'); ?>
  64.  
  65.  
  66.  
  67. <!-- Code for pingback url -->
  68.  
  69. <?php bloginfo('pingback_url'); ?>
  70.  
  71. <!-- Code for theme location -->
  72.  
  73. <?php bloginfo('template_url'); ?>
  74.  
  75.  
  76.  
  77. <!-- Code for Wordpress version -->
  78.  
  79. <?php bloginfo('version'); ?>
  80.  
  81.  
  82.  
  83. <!-- Atom feed link -->
  84.  
  85. <?php bloginfo('atom_url'); ?>
  86.  
  87. <!-- RSS2 feed link -->
  88.  
  89. <?php bloginfo('rss2_url'); ?>
  90.  
  91.  
  92.  
  93. <!-- url of your website -->
  94.  
  95. <?php bloginfo('url'); ?>
  96.  
  97. <!-- declairing for html type code -->
  98.  
  99. <?php bloginfo('html_type'); ?>
  100.  
  101.  
  102.  
  103. <!-- Code for Charset Set -->
  104.  
  105. <?php bloginfo('charset'); ?>
  106.  
  107.  
  108.  
  109. <!-- if statemant for post find/search -->
  110.  
  111. <?php if(have_posts()) : ?>
  112.  
  113. <!-- while statemant -->
  114.  
  115. <?php while(have_posts()) : the_post(); ?>
  116.  
  117.  
  118.  
  119. <!-- End while statemant -->
  120.  
  121. <?php endwhile; ?>
  122.  
  123. <!-- End if statemant -->
  124.  
  125. <?php endif; ?>
  126.  
  127. <!-- To get header.php -->
  128.  
  129. <?php get_header(); ?>
  130.  
  131. <!-- To get sidebar.php -->
  132.  
  133. <?php get_sidebar(); ?>
  134.  
  135. <!-- To get footer.php -->
  136.  
  137. <?php get_footer(); ?>
  138.  
  139.  
  140.  
  141. <!-- To get time and date -->
  142.  
  143. <?php the_time('m-d-y') ?>
  144.  
  145. <!-- To get pop-up comment's link -->
  146.  
  147. <?php comments_popup_link(); ?>
  148.  
  149. <!-- permanent link for you post/page -->
  150.  
  151. <?php the_permalink() ?>
  152.  
  153.  
  154.  
  155. <!-- Show category >>code -->
  156.  
  157. <?php the_category(', ') ?>
  158.  
  159. <!-- ID for post/page -->
  160.  
  161. <?php the_ID(); ?>
  162.  
  163. <!-- For post link -->
  164.  
  165. <?php edit_post_link(); ?>
  166.  
  167. <!-- list for link -->
  168.  
  169. <?php get_links_list(); ?>
  170.  
  171.  
  172.  
  173. <!-- Call for comment template -->
  174.  
  175. <?php comments_template(); ?>
  176.  
  177.  
  178.  
  179. <!-- Site page list -->
  180.  
  181. <?php wp_list_pages(); ?>
  182.  
  183. <!-- site cstegory list -->
  184.  
  185. <?php wp_list_cats(); ?>
  186.  
  187. <!-- get default calender -->
  188.  
  189. <?php get_calendar(); ?>
  190.  
  191.  
  192.  
  193. <!-- Get archive -->
  194.  
  195. <?php wp_get_archives() ?>
  196.  
  197.  
  198.  
  199. <!-- Navigation link for post -->
  200.  
  201. <?php posts_nav_link(); ?>
Add Comment
Please, Sign In to add comment