Get the site sitle:-
<?php bloginfo('title'); ?>
<?php bloginfo('title'); ?>
Get the style sheet linked:-
<?php bloginfo('stylesheet_url');?>
<?php bloginfo('stylesheet_url');?>
For any other head content:-
<?php wp_head(); ?>
To get the name of the site:-
<?php bloginfo('name'); ?>
To get discription of the site:-
<?php bloginfo('name'); ?>
To get the navigation bar:-
<?php wp_nav_menu(); ?>
To get the header file:-
<?php get_header(); ?>
To get the footer file:-
<?php get_footer(); ?>
To get the sidebar:-
<?php get_sidebar(); ?>
To get the Posts:-
<?php while(have_posts()) : the_post(); ?>
<?php the_title(); ?>/* To get the title of the post */
<?php the_content(); ?>/* To get the conent of the post */
<?php endwhile; ?>
To get the image:-
Paste the code where u want to show the image:-
<?php the_post_thumbnail('full'); ?>
Paste the code to active an feature image in Functions.php file:-
<?php add_theme_support('post-thumbnails'); ?>
To get the author link:-
<?php the_author_posts_link(); ?>
To get the date:-
<?php the_time('F jS, Y'); ?>
For comments:-
<?php comments_link();?>/*Gives an link to comment page.*/
<?php comments_number('0 comment','1 comment','% responses'); ?>
/*
0 comment : used for no comment.
1 comment : used for 1 comment.
% responses : used for More than 1 coments */
To link a text to dynamic permalink:-
<?php the_permalink(); ?>
To get the comment box:-
<?php comments_template(); ?>
<?php wp_head(); ?>
To get the name of the site:-
<?php bloginfo('name'); ?>
To get discription of the site:-
<?php bloginfo('name'); ?>
To get the navigation bar:-
<?php wp_nav_menu(); ?>
To get the header file:-
<?php get_header(); ?>
To get the footer file:-
<?php get_footer(); ?>
To get the sidebar:-
<?php get_sidebar(); ?>
To get the Posts:-
<?php while(have_posts()) : the_post(); ?>
<?php the_title(); ?>/* To get the title of the post */
<?php the_content(); ?>/* To get the conent of the post */
<?php endwhile; ?>
To get the image:-
Paste the code where u want to show the image:-
<?php the_post_thumbnail('full'); ?>
Paste the code to active an feature image in Functions.php file:-
<?php add_theme_support('post-thumbnails'); ?>
To get the author link:-
<?php the_author_posts_link(); ?>
To get the date:-
<?php the_time('F jS, Y'); ?>
For comments:-
<?php comments_link();?>/*Gives an link to comment page.*/
<?php comments_number('0 comment','1 comment','% responses'); ?>
/*
0 comment : used for no comment.
1 comment : used for 1 comment.
% responses : used for More than 1 coments */
To link a text to dynamic permalink:-
<?php the_permalink(); ?>
To get the comment box:-
<?php comments_template(); ?>
No comments:
Post a Comment