Professional Documents
Culture Documents
B48 Wordpress Thesis Theme PDF
B48 Wordpress Thesis Theme PDF
https://www.facebook.com/zamil.hossainsezan32
। https://www.facebook.com/zamil.hossainsezan32)।
।
। ।
। ।
।
।
।
।
। ।
।
।
। ।
।
।
।
।
।
।
।
। ।
।
।
।
।
।
।
।
।
।
।
।
।
। ।
।
। ।
। ।
।
।
/* Function structure */
function function_name () {
?>
Add your custom html code here
<?php
}
add_action('thesis_hook_name','function_name');
remove_action('thesis_hook_name','function_name');
।
।
।
।
।
।
।
।
।
।
। √
। √ ।
। √
।
।
। ।
।
।
।
। ।
।
।
function cat_nav() { ?>
<ul id="cat_tabs" class="menu">
<?php wp_list_categories('title_li='); ?>
</ul>
<?php }
add_action('thesis_hook_after_header','cat_nav');
।
।
function posts_nav() {
echo '<li class="tab tab-recent"><a href="">Blog</a><ul>';
wp_get_archives('title_li=&type=postbypost&limit=10');
echo '</ul></li>';
}
add_action('thesis_hook_last_nav_item','posts_nav');
।
function add_search_nav() { ?>
<li class="search"><?php thesis_search_form(); ?></li>
<?php }
add_action('thesis_hook_last_nav_item','add_search_nav');
।
.custom li.search {
float:right;
margin-right:2em;
position:relative;
}
Thesis Theme Tutorial in Bangla - Page 20 of 69
.custom li.search input[type="text"],
.custom li.search input[type="submit"] {
width:100%;
font-size:1.1em;
line-height:1.273em;
padding:0.636em 0.818em;
}
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'my_nav_menu');
function remove_nav() {
if (is_page('6'))
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_before_html','remove_nav');
।
।
।
custom .rss a {
color: #111111;
text-transform: uppercase;
padding-right: 16px;
background: url('../lib/images/icon-rss.gif') 100% 50% no-repeat;
}
.custom .rss a:hover {
color: #111111;
text-decoration: underline;
}
।
।
।
।
।
।
।
।
।
।
।
।
।
।
/*google custom search box*/
//remove thesis navigation
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
/*custom Nav*/
function custom_nav() {
echo '<div id="nav">';
echo '<div id="nav_container">';
thesis_nav_menu();
echo '<div class="searchs">';
?>
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
www.FourBlogger.com Page 28
google.setOnLoadCallback(function(){
var customSearchControl = new
google.search.CustomSearchControl('004112828313249196776:vifdttuqeui');
customSearchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
customSearchControl.draw('cse');
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css"
type="text/css" />
।
/* navigation custom search*/
.custom .menu { background-color: #fff;
width:75.5%;
}
.custom .menu li a{
line-height:1.6em;
font-size:1.5em;}
.custom .searchs{
width:24.5%;
}
।
.menu li.tab-1 a:hover { background:#0000ff; }
.menu li.tab-2 a:hover { background:#ff0000; }
।
.menu li.tab-1 a { color: #000; }
.menu li.tab-2 a { color: #fff; }
।
.menu li.tab-1 a:hover { color:#fff; }
.menu li.tab-2 a:hover { color:#000; }
।
.menu .current a, .menu .current-cat a, .menu .current-menu-item a { background: #dddddd; border-color:
#111111; }
।
.menu li.tab-1 { background: url("image url here") repeat scroll 0 0 transparent; }
.menu li.tab-2 { background: url("image url here") repeat scroll 0 0 transparent; }
।
.menu li.tab-1 a:hover { background: url("image url here") repeat scroll 0 0 transparent; }
.menu li.tab-2 a:hover { background: url("image url here") repeat scroll 0 0 transparent; }
।
.menu { float: right; margin-top: -60px; }
।
।
function add_search_nav() { ?> <li class="search"><?php thesis_search_form(); ?></li><?php }
add_action('thesis_hook_last_nav_item','add_search_nav');
।
.custom li.search { float:right; margin-right:2em; position:relative; } .custom li.search input[type="text"], .custom
li.search input[type="submit"] { width:100%; font-size:1.1em; line-height:1.273em; padding:0.636em 0.818em; }
। ।
।
√ √ ।
। ।
।
function custom_header() { ?>
<h1 id="logo"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>
<span id="tagline"><?php bloginfo('description'); ?></span></h1>
<?php
}
remove_action('thesis_hook_header', 'thesis_default_header');
add_action('thesis_hook_header', 'custom_header');
।
function custom_header() { ?>
<p id="logo"><a href="http://www.example.com/"><?php bloginfo('name'); ?></a></p>
<h1 id="tagline"><?php bloginfo('description'); ?></h1>
<?php
}
remove_action('thesis_hook_header', 'thesis_default_header');
add_action('thesis_hook_header', 'custom_header');
।
.custom #header #tagline {
height: 30px;
text-indent: 25px;
font-weight: bold;
color: #000000;
padding: 10px 5px;
}
.custom #content_box {
margin-top: 3.2em;
}
।
.custom #header {
background-color:#111111;
}
#header {display:none; }
।
body.custom {
background: #44443f;
}
।
।
।
।
।
। ।
।
।
।
।
।
।
।
।
।
।
।
।
।
।
। ।
।
।
।
।
।
।
.headline_area h1 {
color:#B22222;
}
custom h2 a {
color: #3399ff;
text-decoration: none;
}
.custom h2 a:visited {
color: #3399ff;
text-decoration: none;
}
.custom h2 a:hover {
color: #ff0000;
text-decoration: underline;
}
.custom h2 a:active {
color: #3399ff;
text-decoration: underline;
}
।
function thesis_author_box() {
if (is_single()) {
?>
<div class="author_info">
<h4>This post was written by...</h4>
<span class="author_photo"><?php echo get_avatar( get_the_author_id() , 96 ); ?></span>
<p><?php the_author_posts_link(); ?> – who has written <?php the_author_posts(); ?> posts
on <a href="<?php bloginfo('home'); ?>"><?php bloginfo('name'); ?></a>.</p>
<p><?php the_author_description(); ?></p>
<p class="author_email"><a href="mailto:<?php the_author_email(); ?>" title="Send an Email to
the Author of this Post">Contact the author</a></p>
</div>
<?php }
}
add_action('thesis_hook_after_post','thesis_author_box');
।
.custom .author_info {
border:1px dotted #666;
padding:1.0em;
function my_excerpt_length($length) {
return 50; }
add_filter('excerpt_length', 'my_excerpt_length');
.custom .teasers_box h2 a {
color: red;
}
.custom .teasers_box h2 a:hover {
color: yellow;
}
।
function my_excerpt_length($length) {
return 50;
}
।
function teaser_intro($post_count) {
if (is_home()) {
if ($post_count == 1) { ?>
<div class="teaser_intro"><p>HERE IS MY INTRO</p></div>
<?php }
}
}
add_action('thesis_hook_after_post_box','teaser_intro');
।
.custom .teaser_intro {
border:#000 solid 1px;
background-color: #E7F8FB;
padding:1em;
margin:2em;
}
।
function add_to_byline() {
if (!is_page())
echo ' in <span>' . get_the_category_list(',') . '</span>';
}
add_action('thesis_hook_byline_item', 'add_to_byline', '99');
।
function custom_byline() { ?>
<p class="headline_meta"><?php thesis_author(); ?> on <abbr class="published" title="<?php echo
get_the_time('Y-m-d'); ?>"><?php echo get_the_time(get_option('date_format')); ?></abbr>
· <span><a href="<?php the_permalink(); ?>#comments" rel="nofollow">
<?php comments_number(__('0 comments', 'thesis'), __('1 comment', 'thesis'), __('% comments', 'thesis'));
?></a></span></p>
<p class="headline_meta"><?php the_tags('tagged as <span>', ', ', '</span>'); ?>
in <span><?php echo get_the_category_list(','); ?></span></p>
<?php }
add_action('thesis_hook_after_post', 'custom_byline');
।
function add_to_byline() { ?>
</p><p class="headline_meta"><?php echo __('Posted in:', 'thesis') . ' <span>' . get_the_category_list(',') .
'</span>'; ?>
<?php }
add_action('thesis_hook_byline_item', 'add_to_byline', '99');
।
function add_to_byline() { ?>
<p class="headline_meta"><?php echo (''). ' <span>' .get_the_time('F j, Y') . '</span></p>'; ?>
<?php }
.custom abbr.published {
font-weight:bold;
cursor: default;
}
.custom .headline_meta a {
color: #888888;
}
/* Remove Italics */
.custom .headline_meta {
font-style: normal;
}
/* Remove Uppercase */
.custom .headline_meta span,
.custom .headline_meta abbr {
text-transform: none;
}
।
.custom .my-post-stuff { display:block; font-family:arial; line-height:16px; clear:both; height:3em; }
.custom .my-post-stuff a { color:#666; padding:2px 0 2px 2px; text-decoration:none; }
.custom .my-post-stuff a:hover { color:#000; background-color:#fff000; }
.custom .my-post-stuff span.my-icon { display:block; height:16px; width:16px; float:left; background:transparent
url('images/my-test-icon.gif') 50% 50% no-repeat; padding-right:10px; } .custom .my-post-stuff .tags-in-posts {
float:left; padding-right:10px; }
.custom .my-post-stuff .comments-in-posts { float:left; }
।
remove_action('thesis_hook_after_content', 'thesis_prev_next_posts');
add_action('thesis_hook_before_content', 'thesis_prev_next_posts');
।
function no_home_post_nav() {
if (is_home())
remove_action('thesis_hook_after_content', 'thesis_post_navigation');
}
add_action('thesis_hook_before_content','no_home_post_nav');
।
/* Customize Previous and Next Links */
div.post_nav p {
color: #888888;
}
.post_nav a {
text-decoration: none;
}
।
/* Customize Previous and Next Links */
div.prev_next p {
color: #888888;
}
.prev_next a {
text-decoration: none;
}
।
।
।
।
।
।
।
।
।
।
।
।
।
। ।
।
।
। ।
।
।
।
। ।
।
।
। ।
।
। ।
।
।
.custom .comment_num {
float:left;
padding-right:5px;
}
।
.custom .format_text .to_comments span.bracket {color: #ff0000;}
।
remove_action('thesis_hook_after_post', 'thesis_comments_link');
।
/* Style Comments Intro */
.custom .comments_intro p {
font-size: 20px;
}
/* Style Bracket */
.comments_intro p span.bracket {
color: #474EFF;
}
Custom_functions.php ।
function remove_comments_intro($content) {
$content = '';
return $content;
}
add_filter('thesis_comments_intro', 'remove_comments_intro');
।
function replace_comments_intro($content) {
$content = '<div class="comments_intro">';
$content .= '<p><a href="#respond" rel="nofollow">Add a Comment</a></p>';
$content .= '</div>' . "\n";
return $content;}
add_filter('thesis_comments_intro', 'replace_comments_intro');
।
function custom_comment_reply($content) {
$content = str_replace('Reply', 'Reply to this comment', $content);
return $content;
}
add_filter('comment_reply_link', 'custom_comment_reply');
।
/* Re-style the author and children comments */
.custom dl#comment_list .bypostauthor { background: transparent; } /* Reset Thesis default */
.custom dl#comment_list dd { padding-top: 0; } /* Reset Thesis default */
.custom dl#comment_list dd,
.custom dl#trackback_list dd { padding-left: 0; } /* Reset Thesis default */
.custom dl#comment_list dl dd .format_text { margin-bottom: 0; } /* Reset Thesis default */
.custom dl#comment_list dd div,
.custom dl#trackback_list dd div { padding-left: 0.9em; }
.custom dl#comment_list dl dd div { padding-left: 1.5em; }
.custom dl#comment_list dt.bypostauthor,
.custom dl#comment_list dd.bypostauthor>div { background: #E7F8FB none repeat scroll 0 0; }
.custom dl#comment_list dl.children { background: #FFF; padding-left: 1em; padding-top: 1em; }
.custom dl#comment_list dl.children dt { padding-top: 1em; }
.custom dl#comment_list p.reply { margin-bottom: 1em; }
।
.custom div#comments dt.bypostauthor,
#comments dt.bypostauthor div.format_text { background:#FFFFCC; }
.custom div#comments dd.bypostauthor,
#comments dd.bypostauthor div.format_text { background:#FFFFCC; }
।
remove_action('thesis_hook_after_post', 'thesis_comments_link');
add_action('thesis_hook_after_headline','thesis_comments_link');
custom.css
.custom .headline_area h2,
.custom p.to_comments {
display:inline;
}
।
function copyright() {
echo '<p>Copyright © 2008–' . date('Y') . '</p>';
}
add_action('thesis_hook_footer', 'copyright', '99');
।
remove_action('thesis_hook_footer', 'thesis_attribution');
।
function my_footer() {
wp_loginout();
echo '</p>';
}
remove_action('thesis_hook_footer', 'thesis_attribution');
add_action('thesis_hook_footer', 'my_footer');
function footer_cats() {
echo '<ul>';
wp_list_categories('title_li=');
echo '</ul>';
}
।
.custom #footer {
text-align:center;
}
.custom #footer ul,
.custom #footer li {
display:inline;
}
।
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer Widgets Left',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer Widgets Middle',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer Widgets Right',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
।
add_action('thesis_hook_footer', 'thesis_nav_menu');
।
।
।
।
.custom li#categories-411758441.widget h3 {
color: green;
}
।
.custom ul {
list-style-image: none;
list-style-position: outside;
list-style-type: square;
}
.custom li {
padding-bottom: 5px;
}
function no_sidebars() {
if (is_home())
return false;
else
return true;
}
add_filter('thesis_show_sidebars', 'no_sidebars');
।
/*sidebar two-column categories */
register_sidebars(1,
array('name' => 'Sidebar_cat',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
)
);
function sidebar_cat() { ?>
<div id="categories" class="sidebar">
<ul class="sidebar_list">
<?php thesis_default_widget(5); ?>
</ul>
</div>
<?php }
add_action('thesis_hook_after_sidebar_1', 'sidebar_cat', '1');
।
।
।
।
। ।
।
।
।
।
function disable_mmbox_non_home() {
global $thesis_design;
if (!is_home())
$thesis_design->multimedia_box['status'] = "0";
}
add_action('thesis_hook_before_html','disable_mmbox_non_home');
।
।
।
।
।
।
।
।
।
।
।
। ।
function function_name () {
?>
Add your custom html code here
<?php
।
।
function add_to_feature_box() { ?>
<p>Here is some text in the feature box.</p>
<?php }
add_action('thesis_hook_feature_box','add_to_feature_box');
। ।
function fbox_post() {
query_posts('p=117');
if (have_posts()) : the_post(); ?>
<div <?php post_class($classes); ?> id="post-<?php the_ID(); ?>">
<div class="headline_area">
<h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent link to
<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php thesis_byline();
echo "</div>\n";
$post_image = thesis_post_image_info('thumb');
echo "\n";
echo "\t\t\t\t<div class=\"format_text entry-content\">\n";
echo $post_image['output'];
the_excerpt();
echo "\t\t\t\t</div>\n</div>\n";
endif;
wp_reset_query();
}
add_action('thesis_hook_feature_box','fbox_post');
।
।
function disable_fbox_single() {
global $post, $thesis_design;
$no_fbox = get_post_meta($post->ID, 'no_fbox', true);
if (is_single() && $no_fbox)
remove_action('thesis_hook_before_content','thesis_feature_box');
}
add_action('thesis_hook_before_html','disable_fbox_single');
। ।
।
।
।
function add_my_social_icons() {
if (is_page()) { ?>
<div id="social-icons">
<a href="https://twitter.com/YOUR_USER_NAME"><img src="YOUR_IMAGE_URL" width="48"
height="48" alt="Twitter" /></a>
<a href="http://feeds.feedburner.com/YOUR_FEED_URL"><img src="YOUR_IMAGE_URL" width="48"
height="48" alt="RSS" /></a>
<a href="http://www.linkedin.com/in/YOUR_DISPLAY_NAME"><img src="YOUR_IMAGE_URL"
width="48" height="48" alt="LinkedIn" /></a>
<a href="http://www.facebook.com/YOUR_FB_IDENTIFIER"><img src="YOUR_IMAGE_URL" width="48"
height="48" alt="Facebook" /></a>
</div>
<?php }
}
add_action('thesis_hook_after_post','add_my_social_icons');
function fb_share() {
if (is_single()) { ?>
<div class="fb_share">
<a name="fb_share" type="box_count" share_url="<?php the_permalink() ?>"
href="http://www.facebook.com/sharer.php">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
function fb_like() {
if (is_single()) { ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo
urlencode(get_permalink($post->ID));
?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light"
scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px;
height:60px;"></iframe>
<?php }
}
add_action('thesis_hook_after_post','fb_like');
।
function fb_comments() {
if (is_single()) { ?>
<div class="fb_comments">
<div id="fb-root"></div><script
src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<?php the_permalink();
?>" numposts="5" width="500" publish_feed="true"></fb:comments>
</div>
<?php }
}
add_action('thesis_hook_after_post_box', 'fb_comments');
।
function twitter_button() {
if (is_single()) { ?>
<div class="tweetbutton">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-
via="diythemes">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<?php }
}
add_action('thesis_hook_before_headline', 'twitter_button');
custom.css.
.custom div.tweetbutton {
float:right;
padding-left: 5px;
}
।
function page_ads() {
if (is_page()) { ?>
// INSERT YOUR AD CODE HERE
<?php }
}
add_action('thesis_hook_after_post', 'page_ads');
।
function after_first_post_ad($post_count) {
if (is_home()) {
if ($post_count == 1) { ?>
// INSERT YOUR AD CODE HERE
<?php }
}
}
add_action('thesis_hook_after_post', 'after_first_post_ad');
।
।
।
।
।