<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Let&#039;s start again... &#187; Wordpress Themes</title> <atom:link href="http://manchumahara.com/wordpress-themes/feed/" rel="self" type="application/rss+xml" /><link>http://manchumahara.com</link> <description>&#34;Manchumahara&#34; ...... The virtual, crazy, vagabond and  an emotional stupid!</description> <lastBuildDate>Thu, 02 Feb 2012 13:47:24 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>আসুন ওয়ার্ডপ্রেসের ড্যাশ বোর্ড পরিস্কার করি</title><link>http://manchumahara.com/2011/05/26/lets-clean-wordpress-dashboard/</link> <comments>http://manchumahara.com/2011/05/26/lets-clean-wordpress-dashboard/#comments</comments> <pubDate>Thu, 26 May 2011 13:23:01 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Bangla Blogs]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category><guid isPermaLink="false">http://manchumahara.com/?p=677</guid> <description><![CDATA[ওয়ার্ডপ্রেসের এডমিন প্যানেলে লগিন করলেই একগাদা বক্স এসে হাজির হয়। যদিও স্ক্রিন অপশন থেকে সেগুলো সহজে তাড়ানো যায় কিন্তু যদি এমন হয় এডমিন নিজেই ড্যাশবোর্ড পরিস্কার করে রেখে দিলেন নতুন সদস্যের জন্য। তবে এই পরিস্কার এর কাজটা আমরা করবো সামান্য &#8230; <a href="http://manchumahara.com/2011/05/26/lets-clean-wordpress-dashboard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>ওয়ার্ডপ্রেসের এডমিন প্যানেলে লগিন করলেই একগাদা বক্স এসে হাজির হয়। যদিও স্ক্রিন অপশন থেকে সেগুলো সহজে তাড়ানো যায় কিন্তু যদি এমন হয় এডমিন নিজেই ড্যাশবোর্ড পরিস্কার করে রেখে দিলেন নতুন সদস্যের জন্য। তবে এই পরিস্কার এর কাজটা আমরা করবো সামান্য কিছু পিএইচপি কোডিং করে।</p><p>ধাপ একঃ প্রথমে আপনার থীমের functions.php ফাইলে এ ২টি ফাংশন লিখতে হবে। মনে রাখবেন প্লাগিন এর কোডগুলো চাইলে functions.php ফাইলেও লেখা যায়। তাহলে শুরু করা যাকঃ</p><pre class="brush: php; title: ; notranslate">
    //Define the function which unsets the boxes
    function remove_dashboard_widgets() {
            global $wp_meta_boxes;
            myprint_r($wp_meta_boxes);
            /*
            //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
            # Remove plugins feed
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_plugins']);
            # Remove &quot;WordPress News&quot;
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_primary']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_secondary']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
            # Remove incoming links feed
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_incoming_links']);

            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
            unset($wp_meta_boxes['dashboard']['normal']['core']['events_dashboard_window']);
           */
    }
    // Now hook in to the action
    add_action('wp_dashboard_setup', 'remove_dashboard_widgets', 20, 0);

    //better print_r function taken from
    //http://stackoverflow.com/questions/1386331/php-print-r-nice-table
    function myprint_r($my_array) {
        if (is_array($my_array)) {
            echo &quot;&lt;table border=1 cellspacing=0 cellpadding=3 width=100%&gt;&quot;;
            echo '&lt;tr&gt;&lt;td colspan=2 style=&quot;background-color:#333333;&quot;&gt;&lt;strong&gt;&lt;font color=white&gt;ARRAY&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;';
            foreach ($my_array as $k =&gt; $v) {
                    echo '&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;width:40px;background-color:#F0F0F0;&quot;&gt;';
                    echo '&lt;strong&gt;' . $k . &quot;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&quot;;
                    myprint_r($v);
                    echo &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
            }
            echo &quot;&lt;/table&gt;&quot;;
            return;
        }
        echo $my_array;
    }
</pre><p><span id="more-677"></span><br /> ড্যাসবোর্ড এর বক্স বা উইডগেট গুলো একটা গ্লোবাল ভেরিয়েবল $wp_meta_boxes (টাইপ এরে) এ থাকে । এটা একটা মাল্টিডাইমেনশনাল এরে। যদি উপরের কোডটা লিখে ওয়ার্ডপ্রেসের এডমিন প্যানেলে প্রবেশ করেন তাহলে <a href="http://www.webpagescreenshot.info/img/259669-525201150932PM">এই ছবির</a> মতো দেখতে পারবেন।</p><p>দুইঃ এখন আমরা এটা দেখে দেখে বক্স বা উইডগেট গুলো বন্ধ করবো<br /> এখন আমরা remove_dashboard_widgets ফাংশনের কমেন্ট করা অংশ এক্টিভ করবো এবং দরকারে myprint_r($wp_meta_boxes); লাইনটা কমেন্ট করে দেবো।</p><pre class="brush: php; title: ; notranslate">
    //Define the function which unsets the boxes
    function remove_dashboard_widgets() {
            global $wp_meta_boxes;
            //myprint_r($wp_meta_boxes);
            //var_dump('&lt;pre&gt;'.$wp_meta_boxes.'&lt;/pre&gt;');

            //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
            # Remove plugins feed
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_plugins']);
            # Remove &quot;WordPress News&quot;
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_primary']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_secondary']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
            # Remove incoming links feed
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_incoming_links']);

            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
            unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
            unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
            //unset($wp_meta_boxes['dashboard']['normal']['core']['events_dashboard_window']);

    }
</pre><p>তিনঃ অনেক সময় নতুন প্লাগিন ড্যাশবোর্ড এ নতুন বক্স যুক্ত করে যা আমরা ধাপ এক এর মতো দেখে দেখে বন্ধ করে দিতে পারি। তবে এই কাজের জন্য দরকার হবে সামান্য পিএইচপি জ্ঞান <img src='http://manchumahara.com/wp-includes/images/smilies/icon_confused.gif' alt=':-?' class='wp-smiley' /></p><p>চারঃ<br /> ভাবছি একটা প্লাগিন নামিয়ে ফেলবো যেখান থেকে কি কি বক্স আছে তা ইচ্ছা মতো বন্ধ করা যাবে আবার দরকার এক্টিভেট করে দেওয়া যাবে।<br /> কেউ চাইলে আমার সাথে এই প্লাগিন এর কাজে অংশ নিতে পারেন। আমি আইডিয়া এবং কোড স্যাম্পেল দিয়ে দেবো শুরু করার জন্য এবং আপনাকে বাদ বাকী কাজটা সারতে হবে।</p><p>লেখাটি <a target="_blank" href="http://forum.amaderprojukti.com/viewtopic.php?f=60&#038;t=6629&#038;p=52949#p52949">আমাদের প্রযুক্তি ফোরামে</a> পূর্বে প্রকাশিত।</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2011/05/26/lets-clean-wordpress-dashboard/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2011/05/26/lets-clean-wordpress-dashboard/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Adding vertical fixed feedback button</title><link>http://manchumahara.com/2010/08/25/adding-vertical-fixed-feedback-button/</link> <comments>http://manchumahara.com/2010/08/25/adding-vertical-fixed-feedback-button/#comments</comments> <pubDate>Wed, 25 Aug 2010 11:50:00 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category><guid isPermaLink="false">http://manchumahara.com/?p=592</guid> <description><![CDATA[update: 06.09.2010 Wana use as wordpress or joomla plugin ? then buy from my official website Downloads For Joomla For WordPress The Story If you still didn&#8217;t notice, please check again there is a vertical feedback button in my blog &#8230; <a href="http://manchumahara.com/2010/08/25/adding-vertical-fixed-feedback-button/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>update: 06.09.2010<br /> Wana use as wordpress or joomla plugin ? then buy from my official website</p><h4>Downloads</h4><p><a href="http://idea52.com/product/fixed-vertical-feedback-button-for-joomla">For Joomla</a><br /> <a href="http://idea52.com/product/fixed-vertical-feedback-button-for-wordpress">For WordPress</a></p><h4>The Story</h4><p>If you still didn&#8217;t notice, please check again there is a vertical feedback button in my blog , right side. So, sometimes people asks me how to do that ,,, any one can read the source code or having debug tool like <a href="http://getfirebug.com/" target="_blank">firebug</a> for firefox can see the source code and add in his own site. But max time, it&#8217;s true that we don&#8217;t want to learn by reading or google about any problem, we just ask other to get ready made solution. Even we don&#8217;t write in forums about our problems &#8230;. grr&#8230;</p><p>So here is answer of the those question, &#8220;How I added the vertical feedback button?&#8221;</p><p>I know how html works and how css works , I know where to edit in wordpress theme. So many days ago I saw that in a site and copied the source code and image and added in my site <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br /> <strong>I am showing for default wordpress theme tweentyten</strong> and all paths shown bellow are windows style as windows is my primary os.</p><p><strong>Step1:</strong> Copy this <a href="http://manchumahara.com/wp-content/uploads/2010/08/feedback_tab_white.png">image</a> to your wp-contentthemestwentytenimages folder first.</p><p><strong>Step2:</strong> Open style.css file from wp-contentthemestwentyten  dir and ready to add some css code <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br /> Step3: In the file style.css file at last line add the following css codes<br /> <span id="more-592"></span></p><pre class="brush: css; title: ; notranslate">
body &gt; a#feedbackright {
background:url(&quot;images/feedback_tab_white.png&quot;) no-repeat scroll 50% 50% #0066CC;
display:block;
height:90px;
line-height:0;
padding:5px;
position:fixed;
right:0;
/*left:0;*/
text-indent:-99999px;
top:50%;
width:22px;
}
body &gt; a#feedbackright:hover {
background-color:#FF8B00;
}
</pre><p>Here if you want to show in  left side then comment the right:0; line and uncomment the line left:0; Also if you want to up down the position of the feedback button then edit the value for top:50%</p><p><strong>Step3.: </strong>Open footer.php from the same dir of style.css file and go to bottom of that file to add the following lines after the end of wrapper div(<strong>here I have added the end tag of wrapper div so that you get easily</strong>)</p><pre class="brush: xml; title: ; notranslate">&lt;/div&gt;&lt;!-- #wrapper --&gt;
&lt;a href=&quot;&lt;?php echo get_permalink(here will be your contact page id); ?&gt;&quot; id=&quot;feedbackright&quot;&gt;feedback&lt;/a&gt;</pre><p>look in the above code there is something &#8220;here will be your contact page id&#8221;  you have to replace this text with your contact page id. if you don&#8217;t know how to get page id then you can install <a href="http://sivel.net/wordpress/simply-show-ids/">this wordpress plugin</a> and activate, then go to any menu from left column for listing like posts, pages, categories, tags etc you will see an extra line at right col for id. Ok let your contact page id is 2 then the line will be like</p><p>note: here I am writing the last tag of wrapper div</p><pre class="brush: xml; title: ; notranslate">&lt;a href=&quot;&lt;?php echo get_permalink(2); ?&gt;&quot; id=&quot;feedbackright&quot;&gt;feedback&lt;/a&gt;</pre><p>Step4: now it&#8217;s time you do it and let me know.</p><blockquote><p>Wana use as wordpress or joomla plugin ? then buy from my official website</p><h4>Downloads</h4><p><a href="http://idea52.com/product/fixed-vertical-feedback-button-for-joomla">For Joomla</a><br /> <a href="http://idea52.com/product/fixed-vertical-feedback-button-for-wordpress">For WordPress</a></p></blockquote>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2010/08/25/adding-vertical-fixed-feedback-button/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2010/08/25/adding-vertical-fixed-feedback-button/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>ওয়ার্ড প্রেস টিপ্স-৩</title><link>http://manchumahara.com/2009/09/17/wordpresstips3/</link> <comments>http://manchumahara.com/2009/09/17/wordpresstips3/#comments</comments> <pubDate>Thu, 17 Sep 2009 14:25:51 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Bangla Blogs]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[wordpress tips]]></category> <category><![CDATA[wptips]]></category><guid isPermaLink="false">http://manchumahara.com/2009/09/17/%e0%a6%93%e0%a7%9f%e0%a6%be%e0%a6%b0%e0%a7%8d%e0%a6%a1-%e0%a6%aa%e0%a7%8d%e0%a6%b0%e0%a7%87%e0%a6%b8-%e0%a6%9f%e0%a6%bf%e0%a6%aa%e0%a7%8d%e0%a6%b8-%e0%a7%a9/</guid> <description><![CDATA[যারা এই সিরিজের আগের দুইটা পোস্ট পড়েননি তাদের জন্যঃ ওয়ার্ড প্রেস টিপ্স-১(আমার ব্যক্তিগত ব্লগে) ওয়ার্ড প্রেস টিপ্স-২(আমার ব্যক্তিগত ব্লগে) ওকে তাহলে আজকের টিপ্স শুরু করা যাক। এর আগে লিখেছিলাম কিভাবে ওয়ার্ডপ্রেস কাস্টম পেজ তৈরি করা যায় যা ছিলো কাস্টম টেমপ্লেট &#8230; <a href="http://manchumahara.com/2009/09/17/wordpresstips3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>যারা এই সিরিজের আগের দুইটা পোস্ট পড়েননি তাদের জন্যঃ<br /> <a href="http://forum.amaderprojukti.com/viewtopic.php?f=60&amp;t=4264">ওয়ার্ড প্রেস টিপ্স-১</a>(<a href="http://manchumahara.com/2009/09/05/wordpresstips1">আমার ব্যক্তিগত ব্লগে</a>)<br /> <a href="http://forum.amaderprojukti.com/viewtopic.php?f=60&amp;t=4267">ওয়ার্ড প্রেস টিপ্স-২</a>(<a href="http://manchumahara.com/2009/09/06/wordpresstips2">আমার ব্যক্তিগত ব্লগে</a>)</p><p>ওকে তাহলে আজকের টিপ্স শুরু করা যাক। এর আগে লিখেছিলাম কিভাবে ওয়ার্ডপ্রেস কাস্টম পেজ তৈরি করা যায় যা ছিলো কাস্টম টেমপ্লেট ব্যবহার করে। কিন্তু একত্রে যা হয় পাতাটা ওয়ার্ড প্রেসের ডাটাবেজ থেকে আসে, মানে পাতার কন্টেন্ট। কিন্তু যদি এমন চাই যে একটা স্ট্যাটিক পাতা হবে কিন্তু ওয়ার্ড প্রেসের ভেতরে থেকে এবং ঐ পাতায় ওয়ার্ড প্রেসের যাবতীয় টেমপ্লেট ট্যাগ ব্যবহার করা যাবে। ধরুন আপনি ওয়ার্ড প্রেস ইনস্টলেশনের রুট ডিরেক্টরীতে একটা ফোল্ডার বানালেন যার নাম myfolder. তাহলে  এই ডিরেক্টরীর লিঙ্ক হবে http://yoursite.com/myfolder  দেখুন এটা কিন্তু ওয়ার্ড প্রেসের ফোল্ডার নয়।<br /> এখন এই ফোল্ডারে একটা php ফাইলে তৈরি করুন। ধরুন myfile.php।<br /> ফাইলের শুরুতেই লিখুন এই রকমঃ</p><pre class="brush: php; title: ; notranslate">&lt; ?php
	define('WP_USE_THEMES', false);
	require( dirname(__FILE__) .'/../wp-blog-header.php');
?&gt;</pre><p>যদি myfile.php একদম রুটে রাখেন তাহলে</p><pre class="brush: php; title: ; notranslate">&lt; ?php
	define('WP_USE_THEMES', false);
	require( dirname(__FILE__) .'/wp-blog-header.php');
?&gt;</pre><p><span id="more-379"></span></p><p>define(&#8216;WP_USE_THEMES&#8217;, false); এই লাইন দিয়ে আমরা ডিফাইন করে দিচ্ছি এটা ওয়ার্ড নরমাল টেমপ্লেট ফাইল না। তাই একে নরমালি লোড করো।<br /> এর পরের লাইনে require( dirname(__FILE__) .&#8217;/wp-blog-header.php&#8217;); বা require( dirname(__FILE__) .&#8217;/../wp-blog-header.php&#8217;);  দিয়ে আমরা wp-blog-header.php ফাইলটি ইনক্লুড করছি। আর সাথে সাথে ওয়ার্ড প্রেসের ফ্রেমওয়ার্কে ঢুকে যাচ্ছি।<strong> আর এখন যা কিছু নরমাল থীম ফাইলে লিখি সেই রকম লিখলেই হবে।</strong><br /> আর এই ফাইলে এক্সেস বা লিঙ্ক হবে এই রকমঃ</p><p>http://yoursite.com/myfolder/myfile.php</p><p>হয়তো ভাবছেন এটা কেন দরকার। এমন হতে পারে না যে আপনাকে একটা দ্রুত স্ট্যাটিক পেজ বানানো দরকার। আবার আমার মতো সমস্যায় যদি পড়েন যেমন। আমাকে একটি পাতায় ফ্লাশের একটি এপ্লিকেশন যুক্ত করতে হবে কিন্তু থীম ফোল্ডার থেকে ফ্লাসের সোর্স দেখিয়ে দিলে পুরা কাজ করে না। কারণ ফ্লাশ ফাইলটি সেইম ডিরেক্টরীতে আরো কিছু ফাইল থেকে ইনপুট নেই যা সে ডিটেক্ট করতে পারে না এবং আমি চাইলেই আমার নিজের মতো করে ফ্লাশ ফাইল আপডেট করতে পারছি না। তো এই সমস্যা সমাধান করতে গিয়েই এটা বের করেছিলাম।<br /> নিচে আমার বর্তমান দুইটা প্রফেশনাল প্রজেক্টের লিঙ্ক দিচ্ছি আরো পরিস্কার করার জন্যঃ<br /> একঃ http://sedayeislam.com/audio<br /> দুইঃ  http://sedayeislam.com/conf</p><p>এখানে এক নং লিঙ্কটি হলো ওয়ার্ড প্রেসের একটা নরমাল পেজ যা কাস্টম থীম ফাইলে দিয়ে করা। আর দুই নং লিঙ্কটি হলো আজকের টিপ্স যা নিয়ে মানে স্ট্যাটিক পেজ কিন্তু ওয়ার্ড প্রেসের সব টেমপ্লেট ট্যাগ ব্যবহার করে।</p><p>ধন্যবাদ কষ্ট করে পড়ার জন্য।</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/09/17/wordpresstips3/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/09/17/wordpresstips3/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>ওয়ার্ড প্রেস টিপ্স২</title><link>http://manchumahara.com/2009/09/06/wordpresstips2/</link> <comments>http://manchumahara.com/2009/09/06/wordpresstips2/#comments</comments> <pubDate>Sun, 06 Sep 2009 03:22:26 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Bangla Blogs]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[wp tips]]></category><guid isPermaLink="false">http://manchumahara.com/2009/09/06/%e0%a6%93%e0%a7%9f%e0%a6%be%e0%a6%b0%e0%a7%8d%e0%a6%a1-%e0%a6%aa%e0%a7%8d%e0%a6%b0%e0%a7%87%e0%a6%b8-%e0%a6%9f%e0%a6%bf%e0%a6%aa%e0%a7%8d%e0%a6%b8%e0%a7%a8-2/</guid> <description><![CDATA[গতকাল ওয়ার্ড প্রেস নিয়ে লিখেছিলাম এই টপিকে এবং আমার ব্লগে এখানে। আজকে আবার নতুন কিছু নিয়ে লিখবো ,সাথে সাথে গতকালের ধারবাহিকতা চলবে। আমরা এই সিরিজের মূল উদ্দেশ্য ওয়ার্ড প্রেসের নরমাল ইউজার থেকে শুরু করা ওয়ার্ড প্রেস বেসড ওয়েব ডেভেলপার সবার &#8230; <a href="http://manchumahara.com/2009/09/06/wordpresstips2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>গতকাল ওয়ার্ড প্রেস নিয়ে লিখেছিলাম এই <a href="http://forum.amaderprojukti.com/viewtopic.php?f=60&amp;t=4264">টপিকে</a> এবং আমার ব্লগে <a href="http://manchumahara.com/2009/09/05/wordpresstips1/">এখানে</a>। আজকে আবার নতুন কিছু নিয়ে লিখবো ,সাথে সাথে গতকালের ধারবাহিকতা চলবে। আমরা এই সিরিজের মূল উদ্দেশ্য ওয়ার্ড প্রেসের নরমাল ইউজার থেকে শুরু করা ওয়ার্ড প্রেস বেসড ওয়েব ডেভেলপার সবার জন্য আমার জানা ট্রিক্স ও তথ্যগুলো শেয়ার করাঃ<br /> তিনঃ &#8216;থীমে সাব থীম ফাইল যুক্ত করা&#8217;</p><p>আগের দিন বলেছিলাম কিভাবে নতুন হেডার ফাইল যুক্ত করা যায়। চাইলে নিচের মতো করেও আমরা নতুন ফাইল থীমের যে কোন জায়গায় যুক্ত করতে পারি। কারণ একই ফাইলে অনেক কিছু লিখলে ট্রাক রাখা সমস্যা হয়।</p><pre class="brush: php; title: ; notranslate">&lt; ?php include (TEMPLATEPATH . '/yourfilename.php'); ?&gt;</pre><p>yourfilename.php নামের ফাইলটি আপনার বর্তমান এক্টিভ বা যে থীম নিয়ে কাজ করছেন তার ভেতর রাখুন। আর অন্য থীম ফাইলের যেখানে দরকার সেখানে ব্যবহার করুন। TEMPLATEPATH আপনার বর্তমান থীমের ডিরেক্টরী। প্রশ্ন করতে পারেন এমন ঝামেলা কেন করবো বা এটার সুবিধা কি তাই তো ? হুম&#8230; ওয়ার্ড প্রেস দিয়েই আপনি চাইলে জুমলার মতো সাইটে বানিয়ে ফেলতে পারেন। জুমলাতে আমরা মডুল প্লেস হিসাবে যা বলে থাকি ওয়ার্ড প্রেসে তাকে বলা হয় সাইডবার(sidebar) আর মডুল গুলোকে ওয়ার্ড প্রেসের ভাষায়(বলা যেতে পারে) উইজেস(widget). আপনি চাইলে ওয়ার্ড প্রেসে যত ইচ্ছা সাইড বার ব্যবহার করতে পারেন তবে আপনার থীমে সেই সাপোর্ট থাকতে হবে। এই বিষয়টা নিয়ে পরের পোস্টে লিখি তাহলে।</p><p>চারঃ &#8216;ওয়ার্ড প্রেসে যত ইচ্ছা সাইড বার যুক্ত করা&#8217;</p><p>প্রথমেই বলে রাখি নতুন কিছু জানার আগ্রহ না থাকলে বা এক্সপেরিমেন্ট করার ইচ্ছা না থাকলে এখনই মানে মানে কেটে পড়তে পারেন না হলে পরে পস্তাবেন। :ttt:</p><p>&#8216;তিন&#8217; নং টিপ্সের কিছু বলা দরকার। ওয়ার্ডপ্রেসে আমরা নিচের কোড টুকু দিয়ে সাইডবার ফাইলটি লোড করি।</p><pre class="brush: php; title: ; notranslate">&lt; ?php get_sidebar(); ?&gt;</pre><p>এটা যা করে তা হলো থীমের ভেতর sidebar.php ফাইলটা include  করে। এখন যদি আপনার বিশেষ পাতায় বিশেষ কোড লেখা সাইড বার দরকার হয় তাহলে কি করবেন  সেটা যদি এখনও না ভেবে থাকেন তাহলে আপনার উপর আমি এখনি কিন্তু খেপে গেছি। &gt;:D&lt; হ্যাঁ সেই আগের ট্রিক্স এখন যে সাইড বার ফাইলটা আছে সেটা কপি করে নতুন ফাইলে হিসাবে সেইভ করুন আর নাম দিন আগের সেই ফরম্যাটে যেমন sidebar-mycustomsidebar.php  আর এই ফাইলে নিজের ইচ্ছা মতো পরিবর্তন করুন। আর এটা লোড করুন এই ভাবে</p><pre class="brush: php; title: ; notranslate">&lt;?php get_sidebar('mycustomsidebar'); ?&gt;</pre><p>। মজা ?</p><p><span id="more-376"></span></p><p>ওহ এখন সাইডবার যত ইচ্ছা বা মডুল পজিশন কিভাবে বানাবো সেটা বলি। যদি আপনি এডমিন প্যানেল থেকে ওয়ার্ড প্রেসের ডিফল্ট থীম পছন্দ করেন কিংবা ক্লাসিক থীম পছন্দ করেন তাহলে দেখবেন সাইডবার মাত্র একটা যা ফ্রন্ট এন্ডে ডান দিকে বা বাম দিকে দেখানো হয়। একটা সাইডবারের কারণ এই একটা সাইড বারই থীমে যুক্ত করা যা থীমের ভেতর functions.php ফাইলটা দেখলে বুঝতে পারবেন। কোড default থীমে এই রকমঃ</p><pre class="brush: php; title: ; notranslate">
if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
        'after_widget' =&gt; '&lt;/li&gt;',
        'before_title' =&gt; '&lt;h2 class=&quot;widgettitle&quot;&gt;',
        'after_title' =&gt; '&lt;/h2&gt;',
    ));
</pre><p>আর ক্লাসিকে এ এই রকমঃ</p><pre class="brush: php; title: ; notranslate">
if ( function_exists('register_sidebar') )
	register_sidebar(array(
		'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
		'after_widget' =&gt; '&lt;/li&gt;',
		'before_title' =&gt; '',
		'after_title' =&gt; '',
	));

?&gt;
</pre><p>এখন দেখুন আমার নিজের বানানো একটা থীমে আমি কতগুলোস সাইডবার ব্যবহার করেছিঃ</p><pre class="brush: php; title: ; notranslate">// sidebar stuff
if ( function_exists('register_sidebar') )
{
	register_sidebar(array('name' =&gt; 'Sidebar Left1','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Left2','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Bottom','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Popular','before_widget' =&gt; '','after_widget' =&gt; '','before_title' =&gt; '&lt;h4 class=&quot;expandable&quot;&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Poll','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Quotes','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Newsletter','before_widget' =&gt; '&lt;div class=&quot;widget_letter&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar BlogPage','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Bloggeronline','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Frontadvertise','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Blogadvertise','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
	register_sidebar(array('name' =&gt; 'Sidebar Readsubscribe','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;'));
}</pre><p>যদি নিচের লাইন খেয়াল করুন</p><pre class="brush: php; title: ; notranslate">register_sidebar(array('name' =&gt; 'Sidebar Left2','before_widget' =&gt; '&lt;div class=&quot;widget&quot;&gt;','after_widget' =&gt; '&lt;/div&gt;','before_title' =&gt; '&lt;h4&gt;','after_title' =&gt; '&lt;/h4&gt;')); </pre><p>এখানে register_sidebar ফাংশন ইনপুট হিসাবে একটি এসোসিয়েটিভ array। যদি name হিসাবে কিছু না দেওয়া হয় তাহলে এডমিন থেকে সাইড বারগুলো Sidebar(1), Sidebar(2) এই ভাবে দেখাবে। কিন্তু এডভান্সড থীম বানানর জন্য এবং সাইট ওনারকে সম্পূর্ণ সিএমএসের স্বাদ দিতে sidebar এর নাম দেওয়া জরুরী। এখন যদি আপনি উপরের &#8216;Sidebar Left2&#8242; নামে সাইডবারটি থীমে কোথাও লোড করতে চান তাহলে অর্গানাইজড ভাবে লিখতে পারেন এই রূপঃ<br /> আগে একটা ফাইল তৈরি করুন sidebar-sidebarleft2.php  এই ফাইলের ভেতর লিখুন</p><pre class="brush: php; title: ; notranslate">&lt; ?php if ( function_exists('dynamic_sidebar') &amp;amp;amp;&amp;amp;amp; dynamic_sidebar('Sidebar Left2') ) : else :
//write something here if u want but see the 'if' condition pls
?&gt;
	&lt; ?php endif; ?&gt;</pre><p>sidebar-sidebarleft2.php ফাইলটা থীমের যেখানে দরকার যুক্ত করুন এই ভাবে</p><pre class="brush: php; title: ; notranslate">&lt; ?php get_sidebar('sidebarleft2'); ?&gt;</pre><p>এখন আপনি এডমিন থেকে widgets গিয়ে Sidebar Left2 সাইডবারে যে যে উইজেস গুলো রাখবেন সেইগুলো শো করবে এই sidebar-sidebarleft2.php  এই ফাইলটা। আশা এখন পর্যন্ত ধৈর্য হারা হয়ে যাননি&#8230; হা হা হা</p><p>আজকের বোনাস টপ্সঃ ধরুন আপনি চাইছেন একটা নির্দিষ্ট ক্যাটাগরীর পাতা অন্য রকম ভাবে দেখাতে। অহ আচ্ছা আপনি কি জানেন যখন আমরা ওয়ার্ড প্রেসে কোন ক্যাটাগরীতে ক্লিক করি তখন ওয়ার্ড প্রেসে টেমপ্লেট ইঞ্জিন প্রথমে category.php(কিছুটা ভুল বলছি এখনো) নামের ফাইল খুঁজে। কিন্তু তার আগে খুঁজে দেখে যে আইডির ক্যাটাগরীতে ক্লিক করা হয়েছে সেই আইডির ফরম্যাটে কোন ফাইল আছে নাকি। যেমন- ধরুন আপনি 6 আইডির ক্যাটাগরীতে ক্লিক করলাম  তাহলে category-6.php  এই ফাইলটা আগে খুঁজবে। তো আপনি যা করবেন তা হলো আপনার থীমের category.php ফাইলটা কপি করে  নাম দিন category-6.php আর  নিজের দরকার মতো পরিবর্তন করে নিন। মু হা হা</p><p>তো নেমে পড়ুন টেস্ট করতে !</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/09/06/wordpresstips2/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/09/06/wordpresstips2/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Adding no follow for links in wp comments</title><link>http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/</link> <comments>http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/#comments</comments> <pubDate>Thu, 23 Jul 2009 08:38:51 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[nofollow]]></category> <category><![CDATA[wpfilter]]></category><guid isPermaLink="false">http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/</guid> <description><![CDATA[One of my senior brother just asked me, how to add no follow rel for comments in wordpress. May be there is plugin for this. Look to my code How to use: 1.Open the functions.php file in ur current theme &#8230; <a href="http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><img src="http://manchumahara.com/wp-content/uploads/2009/07/Dont-Follow-Me.jpg" alt="Don&#039;t Follow Me" title="Don&#039;t Follow Me" width="310" height="310" class="alignleft size-full wp-image-363" />One of my senior brother just asked me, how to add no follow rel for comments in wordpress. May be there is plugin for this. Look to my code <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br /> <strong>How to use:</strong><br /> 1.Open the functions.php file in ur current theme and put these code within php tags.<br /> <br /> <strong>What it will do:</strong><br /> 1. Will add &#8216;no follow&#8217; as rel in url , if comment contains any url.<br /> 2. Will ad &#8216;external&#8217; as rel in url , if comment contains any url.<br /> 3. Will add target=&#8221;_blank&#8221; in comment author&#8217;s url so that their web url open&#8217;s in new window/new tab as in browser settings<br /> 4. Will add target=&#8221;_blank&#8221; to url, if comment contains any url<br /> 5. Wp adds &#8216;no follow&#8217;, &#8216;external&#8217; rel in comment author&#8217;s url by default. So we don&#8217;t need to add this <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br /> <br /> <strong>Tips:</strong><br /> 1.If possible upgrade to wp2.8.2<br /></p><pre class="brush: php; title: ; notranslate">
      function nofollow($text) {
	        $text = preg_replace('/&lt;a /i','&lt;a rel=&quot;nofollow external&quot; ',$text);
	        $text = preg_replace('/&lt;a /i','&lt;a target=&quot;_blank&quot; ',$text);
	        return $text;
    }
    function targetblank($text){
    		$text = preg_replace('/&lt;a /i','&lt;a target=&quot;_blank&quot; ',$text);
	        return $text;
    }

    add_filter('comment_text', 'nofollow');
    add_filter('get_comment_author_link','targetblank');
</pre><p>any question ask me <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br /> p.s.: post image is just for fun <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p><p>BTW, are you afraid of editing your functions.php ? Ok, no problem you can add the above piece of code using the bellow wp plugin.<br /> Note: There is a file embedded within this post, please visit this post to download the file.</p><p>Duh, you are totally unhappy with this post, na ? You can to treat your commentors with &#8220;cake and cook&#8221;, ok no problem.Just  forget my post  and read this blog post &#8230;<a href="http://dmiracle.com/tools/the-single-most-profound-way-to-thank-your-commenters/" rel="nofollow external" target="_blank">&#8220;The Single, Most Profound Way To Thank Your Commenters&#8221;</a>.<br /> Happy now ?</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/07/23/adding-no-follow-for-links-in-comment-in-wp/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>How to use timthumb in WP MU</title><link>http://manchumahara.com/2009/06/04/how-to-use-timthumb-in-wp-mu/</link> <comments>http://manchumahara.com/2009/06/04/how-to-use-timthumb-in-wp-mu/#comments</comments> <pubDate>Thu, 04 Jun 2009 15:55:41 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[timthumb]]></category> <category><![CDATA[wpmu]]></category><guid isPermaLink="false">http://manchumahara.com/2009/06/04/how-to-use-timthumb-in-wp-mu/</guid> <description><![CDATA[I think to show the first image as thumb in wp front page or blog layout is very common for any theme. But to use it in wordpress mu version is not direct or need to do some hack or &#8230; <a href="http://manchumahara.com/2009/06/04/how-to-use-timthumb-in-wp-mu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I think to show the first image as thumb in wp front page or blog layout is very common for any theme. But to use it in wordpress mu version is not direct or need to do some hack or modify the normall process of adding timthub. Normally we upload images from wp media manager and use those in posts. In normal wordpress the upload dir is wp-content/uploads and files and images are uploaded to that directory. In wordpress mu version files are uploaded by user basis folder and for this wp-content/blogs.dir/<strong>userid</strong> is the uploaded dir for any image. here user id is named as folder name for each user. then wp-content/blogs.dir/userid/files. But when u browse the site the image link format is like http://<strong>yoursitename</strong>/files/year/month/image name but format is reshaped by the wp mu htacces which real physical path is like wp-content/blogs.dir/<strong>userid</strong>/files/year/month/image name.<br /> <span id="more-350"></span><br /> the common way to get the first image link from a wp post to use this for timthumb is like bellow:<br /> in wp loop</p><pre class="brush: php; title: ; notranslate">
$pattern = '!preg_match_all($pattern, $post-&gt;post_content, $matches);$image_src = $matches['1'][0];
</pre><p>if $image_src is not null then we generally use this src for image to be used as image src for timthumb. But for wp mu this will not work as for wp mu the physical path is diff.</p><p>Sol: Use global var $blog_id like global $wpdb,$post,$blog_id;<br /> and then</p><pre class="brush: php; title: ; notranslate">
if($image_src != '')
{
   $replace = 'wp-content/blogs.dir/'.$blog_id.'/files';$image_src = str_replace('files',$replace,$image_src);

}
</pre><p>hope u know how to use timthumb and will get solution for using it in wp mu. may this post will remove some pain when u are here by google search about this problem<br /> thanks</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/06/04/how-to-use-timthumb-in-wp-mu/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/06/04/how-to-use-timthumb-in-wp-mu/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>How to make menu like news.bbc.co.uk</title><link>http://manchumahara.com/2009/03/18/how-to-make-menu-like-newsbbccouk/</link> <comments>http://manchumahara.com/2009/03/18/how-to-make-menu-like-newsbbccouk/#comments</comments> <pubDate>Wed, 18 Mar 2009 15:26:41 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category><guid isPermaLink="false">http://manchumahara.com/2009/03/18/how-to-make-menu-like-newsbbccouk/</guid> <description><![CDATA[Now a days I am a great fan of wordpress. Recently I have done some projects on wordpress and getting expert day by day heh heh. This post about how can we make menu in wordpress like news.bbc.co.uk. Now a &#8230; <a href="http://manchumahara.com/2009/03/18/how-to-make-menu-like-newsbbccouk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-352" title="bbc" src="http://manchumahara.com/wp-content/uploads/2009/03/bbc-300x296.jpg" alt="bbc" width="300" height="296" />Now a days I am a great fan of wordpress. Recently I have done some projects on wordpress and getting expert day by day <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> heh heh.</p><p>This post about how can we make menu in wordpress like news.bbc.co.uk. Now a days some clients want clone sites. They don’t think about all the functionality but the look and feel clone <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br /> So to clone the menu like news.bbc.co.uk we what we need:<br /> 1. wp function wp_list_categories(args)<br /> 2. CSS to give look and feel like news.bbc.co.uk</p><p>Before we start let’s check what we are going to do:<br /> here is the image that we are going to make or the menu that we are doing to make using wp_list_categories function and css. Look this menu is 2 level deep. To keep the theme clean u can make a function in functions.php file like bellow and just call the function in theme where u want to place the menu.<br /> Look here we are using echo= 0 as want to just return the output from this function. and depth =2 as we want to make two level hirarachy… check others params that I have used. To know details about the template tag wp_list_categories pls check <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">this page in wp codex</a>.</p><p>Now what we need is to apply the css to style the menu like news.bbc.co.uk… one thing to keep in mind. When u will browse through the category I mean u click the any category from the menu and posts will be shown using category.php template then active category will get an extra class automatic which is helpfull to highlight using css but if u browse any single.</p><pre class="brush: php; title: ; notranslate">function get_leftcatmenu(){
$excludecats = array();
$excludecats = array(1,2,3); //categories to exlclude
//or
//$includecats = array ();
//$includecats = array(1,2,3); //categories to include

/*
// same thing can be done using a simple plugin and saving the categories in option table , bellow code is for comma seperated cat list
$excludecats = explode(',', get_option('bbcnews_leftmenucid'));
$excludecats = implode( &quot;,&quot;,$excludecats);
*/
/*
$includecats = explode(',', get_option('bbcnews_leftmenuscid'));
$includecats = implode( &quot;,&quot;,$seccats);

//sample code to exclude
return wp_list_categories('orderby=name&amp;amp;amp;amp;style=list&amp;amp;amp;amp;hide_empty=0&amp;amp;amp;amp;show_count=0&amp;amp;amp;amp;title_li=&amp;amp;amp;amp;exclude='.$excludecats.'&amp;amp;amp;amp;hierarchical=true&amp;amp;amp;amp;depth=2&amp;amp;amp;amp;echo=0');

// sample code to inlclude
return wp_list_categories('orderby=id&amp;amp;amp;amp;style=list&amp;amp;amp;amp;hide_empty=0&amp;amp;amp;amp;show_count=0&amp;amp;amp;amp;title_li=&amp;amp;amp;amp;include='.$includecats.'&amp;amp;amp;amp;hierarchical=true&amp;amp;amp;amp;depth=2&amp;amp;amp;amp;echo=0');
*/
}
</pre><p>post we need the hightlight the category in the menu to which the single post belongs to. But to make this happen that adding an extra class to the menu to make active while browsing any single posts I have used a plugin <img src='http://manchumahara.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> named “<a href="http://www.screenshine.net/blog/1474_wordpress-plugin-show-active-category">Show Active Category (while browsing a post)</a>“. Note if any post belongs to more one category then it will add extra active class to each category.</p><p>Uff….now check the css code that I used:<br /> Note: this css code works fine in ff3 and ie6 and I have no interest with other browser at this moment.<br /> Code to use in theme:</p><pre class="brush: php; title: ; notranslate">&lt;ul class=&quot;catmenu&quot;&gt;
&lt;li class=&quot;&lt;?php if (is_home()){ echo&quot;&gt; home&quot;&gt;&lt;a href=&quot;&lt;?php echo get_option('home'); ?&gt;&quot;&gt;News Front Page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre><p>and code to add in style.css</p><pre class="brush: php; title: ; notranslate">
ul.catmenu li{ background-color:#E5E5E5; margin-bottom:2px;}
ul.catmenu li a{ text-decoration:none;  line-height:19px;  font-size:11px; font-weight:bold;  padding:2px 0  2px 5px; color:#1F527B; vertical-align:middle; }
ul.catmenu li ul.children li a{ text-decoration:none; line-height:19px; font-family:9px; font-weight:normal; padding:2px 0  2px 5px; vertical-align:middle;}
ul.catmenu li:hover{ background-color:#D8D8D8;}
ul.catmenu li.current-cat{ background:#665F6E url(images/v3_square_rb.gif) repeat-y scroll right top;}
ul.catmenu li.current-cat:hover{ background-color:#665F6E;}
ul.catmenu li.current-cat a{ color:#FFFFFF;}
ul.catmenu li a:hover{ text-decoration:underline;}
ul.catmenu li ul.children{ background-color:#D3D3D3; display:none;}
ul.catmenu li ul.children li{ margin-bottom:0px;}
ul.catmenu li.current-cat-parent{ background:#665F6E;}
ul.catmenu li.current-cat-parent a{ color:#FFFFFF;}
ul.catmenu li.current-cat-parent ul li a,ul.catmenu li.current-cat ul li a{ color:#1F527B;}
ul.catmenu li.current-cat-parent ul li.current-cat{ background:#C0BFBF url(images/v3_square_rb.gif) repeat-y scroll right top;}
ul.catmenu li.current-cat ul.children,ul.catmenu li.current-cat-parent ul.children { display:block; background-color:#D3D3D3; }

ul.catmenu li.current-cat-parent ul li.current-cat a{ font-weight:bold; color:#1F527B;}
</pre><p>have not enogh time to discuss what the above css code do but it took me more than 1 hr to write the above css perfectly <img src='http://manchumahara.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . If u are familiar with the abc of css then u will get the css code easily.</p><p>BTW, u need one image in the images folder and here is link for that image . Copy and paste the image in images folder. Pls keep in mind about the copy right of the image. Here the main thing that I wanted to highlight that how to make clone of any “look and feel” with own creativity that is what I actually did here.</p><p>Another screenshot:</p><p><img class="alignleft size-full wp-image-353" title="bbc2" src="http://manchumahara.com/wp-content/uploads/2009/03/bbc2.JPG" alt="bbc2" width="178" height="245" /></p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/03/18/how-to-make-menu-like-newsbbccouk/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/03/18/how-to-make-menu-like-newsbbccouk/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>is_home-is_single-is_category-is-not-working-in-wp!</title><link>http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/</link> <comments>http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/#comments</comments> <pubDate>Sun, 15 Mar 2009 18:16:00 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category><guid isPermaLink="false">http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/</guid> <description><![CDATA[If u are reached here using search engine then I am sure that you are just fucked up .. is_home(), is_single(), is_category() are not working…specially in footer and other places. I faced the same problem. While working with a wordpress &#8230; <a href="http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>If u are reached here using search engine then I am sure that you are just fucked up <img src='http://manchumahara.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .. is_home(), is_single(), is_category() are not working…specially in footer and other places. I faced the same problem. While working with a wordpress theme, this functions were working fine in footer but once I noticed that they are not working as they should be !….</p><p>Let me explain why and how this problem occurs and what’s the solution :</p><p>I think if u are familiar with  the famus LOOP in wordpress. The following is_home(), is_single(), is_category()  functions depends on the loop. ACtually when u visit the home page then header.php, index.php, sidebar.php and footer.php files are executed and in the same way when u visit a single post then normally header.php, single.php, sidebar.php and footer.php files are executed. Actually some global page specific query is done for single.php, index.php etc. is_home(), is_single(), is_category() they will work fine if u use the default theme and don’t add any custom query !</p><p>Let’s check the code for is_home() function …</p><pre class="brush: php; title: ; notranslate">/**
* Whether current page view is the blog homepage.
*
* @since 1.5.0
* @uses $wp_query
*
* @return bool True if blog view homepage.
*/
function is_home () {
global $wp_query;
return $wp_query-&gt;is_home;
}
</pre><p>Ok, for custom query maximum time I use this function get_posts. But to get more control I used query_posts. They are same and share some common arguments but query_posts gives more controls and more arguments to pass to get the exact query. Now Let’s check the code for query_posts() function</p><pre class="brush: php; title: ; notranslate">/**
* Setup the Loop based on the query variables.
*
* @uses WP::$query_vars
* @since 2.0.0
*/
function query_posts() {
global $wp_the_query;
$this-&gt;build_query_string();
$wp_the_query-&gt;query($this-&gt;query_vars);
}
</pre><p>and code for get_posts</p><pre class="brush: php; title: ; notranslate">/**
* Retrieve list of latest posts or posts matching criteria.
*
* The defaults are as follows:
*     'numberposts' - Default is 5. Total number of posts to retrieve.
*     'offset' - Default is 0. See {@link WP_Query::query()} for more.
*     'category' - What category to pull the posts from.
*     'orderby' - Default is 'post_date'. How to order the posts.
*     'order' - Default is 'DESC'. The order to retrieve the posts.
*     'include' - See {@link WP_Query::query()} for more.
*     'exclude' - See {@link WP_Query::query()} for more.
*     'meta_key' - See {@link WP_Query::query()} for more.
*     'meta_value' - See {@link WP_Query::query()} for more.
*     'post_type' - Default is 'post'. Can be 'page', or 'attachment' to name a few.
*     'post_parent' - The parent of the post or post type.
*     'post_status' - Default is 'published'. Post status to retrieve.
*
* @since 1.2.0
* @uses $wpdb
* @uses WP_Query::query() See for more default arguments and information.
* @link http://codex.wordpress.org/Template_Tags/get_posts
*
* @param array $args Optional. Override defaults.
* @return array List of posts.
*/
function get_posts($args = null) {
$defaults = array(
'numberposts' =&gt; 5, 'offset' =&gt; 0,
'category' =&gt; 0, 'orderby' =&gt; 'post_date',
'order' =&gt; 'DESC', 'include' =&gt; '',
'exclude' =&gt; '', 'meta_key' =&gt; '',
'meta_value' =&gt;'', 'post_type' =&gt; 'post',
'suppress_filters' =&gt; true
);

$r = wp_parse_args( $args, $defaults );
if ( empty( $r['post_status'] ) )
$r['post_status'] = ( 'attachment' == $r['post_type'] ) ? 'inherit' : 'publish';
if ( ! empty($r['numberposts']) )
$r['posts_per_page'] = $r['numberposts'];
if ( ! empty($r['category']) )
$r['cat'] = $r['category'];
if ( ! empty($r['include']) ) {
$incposts = preg_split('/[\s,]+/',$r['include']);
$r['posts_per_page'] = count($incposts);  // only the number of posts included
$r['post__in'] = $incposts;
} elseif ( ! empty($r['exclude']) )
$r['post__not_in'] = preg_split('/[\s,]+/',$r['exclude']);

$r['caller_get_posts'] = true;

$get_posts = new WP_Query;
return $get_posts-&gt;query($r);

}
</pre><p>get_posts will not make any problem for is_single(), is_home(), is_category() etc functions.</p><p><strong>Solution: </strong>To avoid this problem you can use this trick:</p><pre class="brush: php; title: ; notranslate">$query_backup = clone($GLOBALS['wp_query']); //keep backup
......
query_posts(.....)
...
$GLOBALS['wp_query'] = $query_backup; //restore from backup
</pre><p>Further info: Please keep in mind that the php function clone() will not work in php4, it’s just for php5 becuase Php5 handles objects in different way. Like in php5 you can copy a object in this way<br /> $new_object = clone ($old_object);<br /> here $new_object will not copy the object actually though it will just point to $old_object but in php4 the thing is just copy like bellow.<br /> $new_object = $old_object;</p><p>You can <a href="http://www.hat.net/geeky/php_tricks_-_php_5_clone_in_php4">check this link</a> for better explanation.</p><blockquote><p> Sometimes pain gives us a way to think <img src='http://manchumahara.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p></blockquote><p>thanks</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/03/15/is_home-is_single-is_category-is-not-working-in-wp/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>ওয়ার্ড প্রেসের থীম কিভাবে কাজ করে-পর্ব-১</title><link>http://manchumahara.com/2009/03/13/how-wordpress-theme-works-part1/</link> <comments>http://manchumahara.com/2009/03/13/how-wordpress-theme-works-part1/#comments</comments> <pubDate>Fri, 13 Mar 2009 12:05:39 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Bangla Blogs]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category><guid isPermaLink="false">http://manchumahara.com/2009/03/13/%e0%a6%93%e0%a6%af%e0%a6%bc%e0%a6%be%e0%a6%b0%e0%a7%8d%e0%a6%a1-%e0%a6%aa%e0%a7%8d%e0%a6%b0%e0%a7%87%e0%a6%b8%e0%a7%87%e0%a6%b0-%e0%a6%a5%e0%a7%80%e0%a6%ae-%e0%a6%95%e0%a6%bf%e0%a6%ad%e0%a6%be/</guid> <description><![CDATA[[যদি আপনার নরমাল এইটিএমএল এবং একদম বেসিক পিএইচপি জ্ঞান না থাকে তাহলে এই পোস্টের কিছু বিষয় জটিল মনে হতে পারে ] অনেকেই ব্যক্তিগত হোস্টিং এ ওয়ার্ড প্রেস ইনস্টল করে ব্লগিং করছেন এবং পছন্দের কোন ফ্রি থীম ইনস্টল করে দিব্যি সুন্দর &#8230; <a href="http://manchumahara.com/2009/03/13/how-wordpress-theme-works-part1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>[যদি আপনার নরমাল এইটিএমএল এবং একদম বেসিক পিএইচপি জ্ঞান না থাকে তাহলে এই পোস্টের কিছু বিষয় জটিল মনে হতে পারে ]<br /> অনেকেই ব্যক্তিগত হোস্টিং এ ওয়ার্ড প্রেস ইনস্টল করে ব্লগিং করছেন এবং পছন্দের কোন ফ্রি থীম ইনস্টল করে দিব্যি সুন্দর ব্যক্তিগত ব্লগ বানিয়ে নিচ্ছেন। যদি এমন হয় এই থীম কিভাবে কাজ করে তা যদি জানা থাকে তাহলে আরো মজা না ? ইচ্ছা হলো একটু সম্পাদনা করে থীমটাকে নিজের মতো সাজিয়ে নিলেন। আমার বকবক শুরুর আগে আসুন জেনে নেই এই পোস্টের উদ্দেশ্যগুলোঃ</p><p>একঃ ওয়ার্ড প্রেসের থীম কিভাবে কাজ করে<br /> দুইঃ থীম ফোল্ডারের কোন ফাইলের কাজ কি<br /> তিনঃ থীম সম্পাদনা করা<br /> চারঃ ইত্যাদি :ttt:<br /> <span id="more-345"></span><br /> যেহেতু কাস্টম থীম বিভিন্ন জন বিভিন্ন ভাবে করে (যদিও কমন কিছু মিলতো আছেই) তাই themes ফোল্ডারের default থীম নিয়ে এখানে আলোচনা করবো। এবং তার আগে classic থীমটাতে একটু ঢুঁ মারবো। কারণ ক্লাসিক থীম হলো ওয়ার্ড প্রেসের জন্য সবচেয়ে মিনিমালিস্টিক থীম। ::U::<br /> যে সব ফাইলে আছে তা নিম্নরূপঃ<br /> comments.php (কমেন্টের জন্য টেমপ্লেট ফাইল)<br /> comments-popup.php (পপ আপ কমেন্টের জন্য টেমপ্লেট ফাইল)<br /> footer.php (পরে আসছি)<br /> functions.php (এটা একটা প্লাগিন ফাইলের মতো কাজ করে। চাইলে নিজের তৈরি কাস্টম ফাংশন বা ক্লাস এই ফাইলে লিখে দেওয়া যায়। অন্যান্য প্লাগিন এর মতো এই ফাইলের সব ফাংশন ওয়ার্ড প্রেস প্রতিবার রিফ্রেশ করার সময় এক্সিকিউট হয়)<br /> header.php (পরে আসছি)<br /> index.php (পরে আসছি)<br /> rtl.css (যে সব ভাষা ডান থেকে বামে লেখা হয় সেই ভাষার জন্য ব্লগের স্টাইল বা সিএসএস ফাইল)<br /> screenshot.png (থীমের চেহারা কেমন হবে সেইটার একখান ফটুক)<br /> sidebar.php (উইজেসগুলো লোড করার জন্য ব্যবহত হয়। সাইড বার অনেকটা জুমলার মডুল প্লেসের মতো। আমরা আস্তে আস্তে এটা নিয়ে এডভান্সড পর্যায়ে শিখবো)<br /> style.css (নিচে এটা দিয়ে পরের কিচ্ছা শুরু)<br /> যদি style.css ফাইলটা ওপেন করেন তাহলে প্রথম দিকেই দেখতে পারবেন নিচের মতো লেখা আছে।</p><blockquote><p> Theme Name: WordPress Classic<br /> Theme URI: http://wordpress.org/<br /> Description: The original WordPress theme that graced versions 1.2.x and prior.<br /> Version: 1.5<br /> Author: Dave Shea<br /> Tags: mantle color, variable width, two columns, widgets</p></blockquote><p>এটা হলো এই থীমের নাম, থীমের লেখক ইত্যাদি বিষয়ে তথ্য। অর্থাৎ যদি থীমের নাম পরিবর্তন করতে চান বা নিজে কোন থীম বানাতে চান তাহলে style.css ফাইলে প্রথমে এই ধরনের কমেন্ট আকারে থীমের নাম এবং অন্যান্য তথ্যাবলী দিয়ে দিতে হবে। style.css ফাইলে এর বাদ বাকী যা আছে নিচে কমেন্ট অংশের পরে সব css code , সময় পেলে সিএসএস নিয়ে অন্য পোস্টে আলোচনা করবো।<br /> আপাতত এই টুকু জানতে পারলাম style.css ফাইল হলো কোন থীমের জন্য সবার আগে প্রয়োজন যা থীমের জন্ম নিবন্ধন করে রাখে এবং ওয়ার্ড প্রেস ইঞ্জিন এই ফাইল পড়ে বুঝতে পারে এই থীমের নাম ও অন্যান্য তথ্য।</p><p>এখন আসি index.php ফাইল কি জন্য আর কি করে। ব্লগ ওপেন করলে ওয়ার্ড প্রেসের ডিফল্ট সেটিংস অনুসারে এই index.php থীমের পাতাটিই লোড হয়। যদি একটু খেয়াল করেন তাহলে দেখবেন ফাইলের শুরুর দিকে আছে get_header(); এবং শেষের দিকে আছে get_footer(); এই দুইটি পিএইচপি ফাংশনের কাজ হলো যথাক্রমে থীম ফোল্ডার থেকে header.php এবং foooter.php লোড করা এবং যে ফাইল থেকে ফাংশন দুইটি কল করা হচ্ছে সেই ফাইলের সাথে মার্জ করা। তার মানে আসলে কি দাড়ালো<br /> header.php<br /> index.php (এর কিছু অংশ)<br /> footer.php<br /> এই তিনটা ফাইল মিলে একটা ফাইল বা একটা পেজ তৈরি হচ্ছে। শুধু তাই যদি footer.php ফাইলটা ওপেন করেন তাহলে দেখবেন শুরুর দিকে get_sidebar(); এই রকম একটা ফাংশন কল হচ্ছে। আপনি যদি সামান্য চতুর হন তাহলে নিশ্চয় বুঝে ফেলেছেন যে এর কাজ হলো sidebar.php ফাইল এর যা কিছু আছে তা লোড করা। এখন প্রশ্ন হতে পারে কেন এই ভাবে ছিড়ে ছিড়ে একটা বড় পাতা বানাতে হবে। উত্তর হলো একই কাজ বার বার না করে যেগুলো পুনরাবৃত্তি হয় সেইগুলো একটা নির্দিষ্ট ফাইলে রাখা হয় আর নতুন নতুন ধরনের কাজ গুলো আলাদা ফাইলে। আর এই ধরনের কনভেনশনের পেছনে কারণ হলো সহজে ভিন্ন ভিন্ন জোড়া দিয়ে নতুন পাতা তৈরি করা।</p><p>কানে কানে একটা গুরুত্বপূর্ণ তথ্য দিয়ে যায় যদি footer.php ফাইলের ট্যাগের আগে wp_footer(); এবং header.php ফাইলের ট্যাগের আগে wp_head(); ফাংশন দুইটি বিশেষ গুরুত্ব বহন করে। যদি কোন থীমে এদের উপস্থিতি না থাকে তাহলে বিভিন্ন প্লাগিনের উপযোগিতা সঠিক ভাবে ভোগ করার জন্য এদের ঐ রকম স্থানে যুক্ত করা আবশ্যক। যেমন wp_footer() ফাংশনের কাজ হলো এই রকম… গুরুত্বপূর্ণ কিছু কাজ বাকি থাকলে এক্ষনি দিয়ে দিন না হলে আমি চলে যাবো…। আবার wp_head() এর কাজ এই রকম… অপারেশন শুরুর আগে কি আর কোন পূর্ব প্রস্তুতি দরকার আছে ? থাকলে আমাকে জানিয়ে দিন…<br /> [যখন আগামীতে প্লাগিন নিয়ে আলোচনা করবো তখন এদের মাজেজা আরো সুন্দর ভাবে বুঝা যাবে]</p><p>…একদিনে বেশি হলে সব গুলিয়ে যেতে পারে :ttt: । তাই পরের পর্বে এইখান থেকে শুরু করবো আবার। >:D<</p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/03/13/how-wordpress-theme-works-part1/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/03/13/how-wordpress-theme-works-part1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ওয়ার্ড প্রেসে এডমিন লগিন পেজকে পরিবর্তন করুন নিজের মতো করে</title><link>http://manchumahara.com/2009/03/12/how-to-change-login-page-in-wordpress/</link> <comments>http://manchumahara.com/2009/03/12/how-to-change-login-page-in-wordpress/#comments</comments> <pubDate>Thu, 12 Mar 2009 11:41:47 +0000</pubDate> <dc:creator>Manchumahara(Sabuj Kundu)</dc:creator> <category><![CDATA[Bangla Blogs]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[Wordpress Themes]]></category><guid isPermaLink="false">http://manchumahara.com/2009/03/12/%e0%a6%93%e0%a6%af%e0%a6%bc%e0%a6%be%e0%a6%b0%e0%a7%8d%e0%a6%a1-%e0%a6%aa%e0%a7%8d%e0%a6%b0%e0%a7%87%e0%a6%b8%e0%a7%87-%e0%a6%8f%e0%a6%a1%e0%a6%ae%e0%a6%bf%e0%a6%a8-%e0%a6%b2%e0%a6%97%e0%a6%bf/</guid> <description><![CDATA[ধরুন আপনার ওয়ার্ড প্রেস ব্লগের(সেলফ হোস্টেড) লিঙ্ক যদি হয় http://www.mysite.com তাহলে আপনার এডমিন প্যানেলে ঢুকার লিঙ্ক হবে এই রকমঃ http://www.mysite.com/wp-admin । এই পাতায় গেলেই বিশাল একটা ওয়ার্ড প্রেসের ছবি। আপনি চাইলেই কিন্তু এই ছবি, ছবির উপর মাউস নিলে যে টুপ &#8230; <a href="http://manchumahara.com/2009/03/12/how-to-change-login-page-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>ধরুন আপনার ওয়ার্ড প্রেস ব্লগের(সেলফ হোস্টেড) লিঙ্ক যদি হয় http://www.mysite.com তাহলে আপনার এডমিন প্যানেলে ঢুকার লিঙ্ক হবে এই রকমঃ http://www.mysite.com/wp-admin । এই পাতায় গেলেই বিশাল একটা ওয়ার্ড প্রেসের ছবি। আপনি চাইলেই কিন্তু এই ছবি, ছবির উপর মাউস নিলে যে টুপ টিপ/টাইটেল(powered by wordpress ) দেখায় এবং ছবিটার লিঙ্ক (ডিফল্ট ওয়ার্ড প্রেস সাইটের লিঙ্ক থাকে) ইত্যাদি পরিবর্তন করে সম্পূর্ণ নিজের মতো করে নিতে পারেন।</p><p>এর জন্য প্লাগিন পাওয়া যায় কিন্তু যদি নিজেই শিখে ফেলেন কিভাবে কাজটা করতে হবে তাহলে মজাটা বেশি… তাই না ? আর হ্যাঁ এই ধরনের পরিবর্তন ওয়ার্ড প্রেস সাপোর্ট করে বলেই কোর ফাইলের কোন ধরনের পরিবর্তন না করে আপানাকে প্লাগিন দিয়ে বা থীম থেকে হুক করার মাধ্যমে নিজের ইচ্ছামত কিছু বসিয়ে দেওয়ার সুযোগ রেখেছে। :C<br /> <span id="more-342"></span><br /> ধাপ একঃ<br /> আপনার থীমের function.php ফাইল টা ওপেন করুন। (এখানে বলে রাখা ভালো যে, এই ফাইলটি অনেকটা প্লাগিনের মতো কাজ করে। ওয়ার্ড প্রেস প্রতিবার পেজ লোড করার সময় যেমন প্রতিটি প্লাগিন এক্সিকিউট করে একই ভাবে এই ফাইলও প্লাগিনের মতো কাজ করে।)<br /> ফাইলের একদম নিচের দিকে php এর ক্লোজিং ট্যাগ(?&gt;) এর আগে নিচের কোড গুলো বসান</p><pre class="brush: php; title: ; notranslate">
// custom login for theme
function manchu_custom_login() {
	echo '&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;' . get_bloginfo('template_directory') . '/custom-login.css&quot; /&gt;';
}
function manchu_change_wp_login_url() {
    echo bloginfo('url');
}

function manchu_change_wp_login_title() {
    echo 'Welcome to ' . get_option('blogname');
}

add_action('login_head', 'manchu_custom_login');
add_filter('login_headerurl', 'manchu_change_wp_login_url');
add_filter('login_headertitle', 'manchu_change_wp_login_title');
</pre><p>কিন্তু আমার কথা মতই কি অন্ধের মতো এই কোড বসিয়ে দেবেন ? <img src='http://manchumahara.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> o: অবশ্যই না। আসুন বুঝার চেস্টা করি কিভাবে কি হচ্ছে।</p><pre class="brush: php; title: ; notranslate"> function manchu_custom_login() {
	echo '&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;' . get_bloginfo('template_directory') . '/custom-login.css&quot; /&gt;';
}
 </pre><p>উপরের ফাংশনে কাজ হবে আপনার থীম ডিরেক্টরী থেকে লগিন পেজের জন্য একটা কাস্টম সিএসএস ফাইলে লোড করবে যা আমরা ধাপ দুইয়ে দেখবো।</p><pre class="brush: php; title: ; notranslate">function manchu_change_wp_login_url() {
    echo bloginfo('url');
}
</pre><p>এই ফাংশনের কাজ হবে লগিন পেজের ছবির লিঙ্ক পরিবর্তন করে ব্লগের লিঙ্ক বসিয়ে দেওয়া যা আমরা এডমিন থেকে পরিবর্তন করতে পারি।</p><pre class="brush: php; title: ; notranslate">function manchu_change_wp_login_title() {
    echo 'Welcome to ' . get_option('blogname');
}
</pre><p> এই খানে ইমেজের উপর মাউস নিলে যে টাইটেল দেখায় সেটা পরিবর্তন করে আমরা এই ভাবে দিচ্ছি<br /> Welcome to [আপনার ব্লগের নাম]</p><p>আর হ্যাঁ নিচের তিন লাইন হলো ফিল্টার বা হুক অর্থাৎ ওয়ার্ড প্রেস ডিফল্ট কাজ না করে আপনার হুক করা কোড এর কেরামতি শো করবে।</p><pre class="brush: php; title: ; notranslate">add_action('login_head', 'manchu_custom_login');
add_filter('login_headerurl', 'manchu_change_wp_login_url');
add_filter('login_headertitle', 'manchu_change_wp_login_title');
</pre><p>ধাপ দুইঃ</p><p>নিশ্চয় ভুলে যাননি যে ধাপ এক এ আমরা একটা কাস্টম সিএসএস ফাইল যুক্ত করেছিলাম। কিন্তু থীমের কোথাও তো সেইভ করলাম না। হুম এখন আমরা সামান্য নির্লজ্জের মতো চুরি করবো কোড।<br /> wp-admin\css এই ফোল্ডার থেকে login.css এই ফাইলটা কপি করি রিনেম করুন custom-login.css এই নামে এবং আপনার বর্তমান থীমের ফোল্ডারে কপি পেস্ট করুন। অনেক খানি হয়ে গেছে। যদি লগিন পেজ রিফ্রেস দেন তাহলে দেখবেন ইমেজ ছাড়া লিঙ্ক এবং টাইটেল পরিবর্তন হয়ে গেছে। বাকি থাকলো শুধু ইমেজ। সাধারণত আপনার থীমের ভেতর একটা images নামে ফোল্ডার থাকার কথা না থাকলে বানিয়ে নিন আর ঐ খানে আপনার পছন্দ মতো ইমেজটা logo-login.gif নামে রাখুন। আর custom-login.css এই ফাইলটা ওপেন করুন আর খুঁজে বের করুন এই লাইনটা</p><pre class="brush: php; title: ; notranslate">background: url(../images/logo-login.gif) no-repeat top center;
</pre><p>বা একবার ফুল ক্লাসের ব্লক এই রকম থাকার কথা</p><pre class="brush: php; title: ; notranslate">h1 a {
	background: url(../images/logo-login.gif) no-repeat top center;
	width: 326px;
	height: 67px;
	text-indent: -9999px;
	overflow: hidden;
	padding-bottom: 15px;
	display: block;
}
</pre><p>এখন এই লাইনটা পরিবর্তন করে এই ভাবে লিখুন</p><pre class="brush: php; title: ; notranslate">background: url(images/logo-login.gif) no-repeat top center;
</pre><p>যদি ঘুমিয়ে না পড়েন আশা করি আপনার লগিন পেজটা কাস্টম একটা লগিন পেজের মতো হয়ে গেছে। আর হ্যাঁ কেউ কেউ হয়তো বলতে পারেন …এতো কষ্ট করার কি দরকার…হুম। যদি আপনি প্রফেশনালী কাজ করেন তাহলে অনেক কিছুই আপনার ক্লায়েন্টের ইচ্ছানুসারে পরিবর্তন করতে হবে আর জেনে রাখলে ক্ষতি কি তাই না ? >:D<<br /> উল্লেখ্যঃ কাস্টম সিএসএস ফাইলটা পরিবর্তন করে আপনি লগিন পেজের অনেক কিছু (কালার, ফন্ট ইত্যাদি) পরিবর্তন করতে পারবেন তবে এর জন্য আপনাকে সামান্য css লেখার জ্ঞান থাকতে হবে।</p><p>ধন্যবাদ।<br /> Note: This blog is retrieved from Google cache as I have lost my two months blog posts for server problem. I&#8217;m sorry to loose the comments for this post <img src='http://manchumahara.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>Comment is open. You can participate in the discussion by visiting <a href='http://manchumahara.com/2009/03/12/how-to-change-login-page-in-wordpress/'>here</a> ]]></content:encoded> <wfw:commentRss>http://manchumahara.com/2009/03/12/how-to-change-login-page-in-wordpress/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 23/104 queries in 0.068 seconds using disk: basic
Object Caching 1125/1209 objects using disk: basic

Served from: manchumahara.com @ 2012-02-09 16:57:09 -->
