Hello This is about quick developing themes and this article is all about broblems with searching worpress functions while developing a theme from scratch.

I am making a list of handy fuctions which are the most used and you should remember these in finger tips.

  • Get a URL from slug name: <?php echo get_permalink( get_page_by_path( ‘contact’ ) ) ; ?>

 

 

There are List of most common functions as well.

  • Adding a default header: <?php get_header(); ?>
  • Adding a default footer: <?php get_footer(); ?>
  • Check if post exists: <?php have_posts(); ?>
  • Making a post: <?php the_post(); ?>
  • Print the Title: <?php the_title(); ?>
  • Print Title attribute: <?php the_title_attribute(); ?>
  • Print the link: <?php the_permalink(); ?>
  • Print the time: <?php the_time(‘F jS, Y’); ?>
  • Print the comma separated  categories: <?php the_category(‘, ‘); ?>
  • Print the content: <?php the_content(); ?>
  • Print the link for an author: <?php the_authors_post_link(); ?>

Leave a Reply