Beruflich Dokumente
Kultur Dokumente
Theme:subtle bridge
Theme URI:http://tareq.net16.net
Author:Tareq Jamal
Author:http://tareq.net16.net
Version:0.1
Description:simple website
Tags:simple website
*/
in HTML tag
<?php language_attributes();?>
in meta charset tag
<?php bloginfo('charset');?>
in meta description
<?php bloginfo('description');?>
when click on logo it will go to home page by writing this code into <a> tag
<?php bloginfo('home')?>
for generating CSS
{
<?php bloginfo('template_directory');?>
<?php bloginfo('template_url');?>
<?php echo get_template_directory_uri();?>
for useful <?php echo esc_url(get_template_directory_uri());?>
We can get with link <?php bloginfo('stylesheet_url');?>
}
for title name
<?php bloginfo('title');?>
for description in the title name
<?php bloginfo('description');?>
according to new rule of wordpress for add a title in file functions.php
<?php
add_theme_support('title-tag');
?>
To add header image option in dashboard write down the code in func tions.php no
ted below
<?php
add_theme_support('custom-header');
?>
To add dynamic image from dashboard write down the code in index.php where it ne
eds to be
<?php
header_image();
?>
To add deafult image write down the code in functions.php
<?php
$args = array(
'default-image' => get_template_directory_uri() . '/images/header.png',
);
add_theme_support( 'custom-header', $args );
<--- To add whole image size write inline CSS code in index.php file 0 0/ 100% 1
00%-->
?>
To add background image write down a code in functions.php
<?php add_theme_support('custom-background');?>
then write a code in index.php inside body tag
<?php body_class();?>
To add menu
//textdomain
load_theme_textdomain('subtle',get_template_directory_uri().'/languages');
register_nav_menus(
array(
'primarymenu' => __('Main Menu','subtle'),
'secondarymenu' => __('Footer Menu','subtle')
));
?>
And write down this code in index.php as well
<?php
wp_nav_menu(array(
'theme_location' => 'primarymenu'
));
?>
For navigation
<?php
the_posts_navigation(array(
'prev_text'=>'Prev',
'next_text'=>'NEXT',
'screen_reader_text'=>' '
);
?>
For pagination
<?php
the_posts_pagination(array(
'show_all' => false,
'prev_text' => 'PREV',
'next_text' => 'NEXT',
'screen_reader_text' => ' ',
'before_page_number' => '<b><i>',
'after_page_number' => '</i></b>'
));
?>