Bootstrap Templates Bundle

Monday, August 26, 2013

How to add a ID column into wordpress Posts and pages

Add these below code to functions.php file  and after adding visit
../wp-admin/edit.php?post_type=page
and ../wp-admin/edit.php



/* Add Post ID column */
add_filter('manage_posts_columns', 'posts_columns_id', 5);
function posts_columns_id($defaults){
    $defaults['wps_post_id'] = 'ID';
    return $defaults;
}
add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2);
function posts_custom_id_columns($column_name, $id){
        if($column_name === 'wps_post_id'){
                echo $id;
    }
}
add_action('admin_head', 'id_column_style');
function id_column_style() {
    echo '<style type="text/css">.column-wps_post_id{width:5%;}</style>';
}


/* Add Page ID column */
add_filter('manage_pages_columns', 'pages_columns_id', 5);
function pages_columns_id($defaults){
    $defaults['wps_page_id'] = 'ID';
    return $defaults;
}
add_action('manage_pages_custom_column', 'pages_custom_id_columns', 5, 2);
function pages_custom_id_columns($column_name, $id){
        if($column_name === 'wps_page_id'){
                echo $id;
    }
}
add_action('admin_head', 'id_column_style');
function ids_column_style() {
    echo '<style type="text/css">.column-wps_page_id{width:5%;}</style>';
}

Thursday, August 1, 2013

How to Install the Facebook Like Box on Your Drupal Website also enable php code as input text format

Get facebook likebox code from facebook.com
suppose

<iframe scrolling="no" frameborder="0" allowtransparency="true" src="http://platform.twitter.com/widgets/follow_button.1340179658.html#_=1344687471539&amp;id=twitter-widget-2&amp;lang=en&amp;screen_name=saranquardz&amp;show_count=true&amp;show_screen_name=true&amp;size=m" class="twitter-follow-button" style="width: 243px; height: 20px;" title="Twitter Follow Button"></iframe><iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fdevsaran.drupal&amp;width=240&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&amp;header=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:240px; height:258px;" allowtransparency="true"></iframe>

Then create a block and add avove code also select php code as input tex format




Do you know how to enable php code for input text format?
see below:

Go to Administration > Modules.
Scroll down to the PHP filter module and check the Enabled box. Press the Save Configuration button.
When you will add ant content/block select php code as input method. That's all

Saturday, July 6, 2013

How to install Module/Extension for opencart

Here is five steps to show, How to install Module/Extension for opencart

1. Unzip the files.
2. Upload the files INSIDE the "upload" folder to your OpenCart root folder. **NOTE: No file should get replaced!
3. Proceed to System > Users > User Groups and grant yourself access and modification permission.      (Optional)
4. In admin panel, go to "Extensions > Modules > Your extension name” and install and configure.
5. Add news from “Extensions > News”.


Tuesday, July 2, 2013

How to Install new Opencart Theme

After Downloading a theme free/premium, Extract your theme

After extracting you will get some some file. There will be read me and some help file also. Try to find
\yourt theme name\OpenCart 1.5.2.1\FILES TO UPLOAD\

Copy this folder and paste into your hosting
To find out which version of OpenCart your store is running on, log in to your admin panel and this should be displayed at the bottom of the page.

Inside FILES TO UPLOAD you will find three folders: admin, catalog and image. Upload those folders to the root directory you have installed OpenCart in.

Don't worry, it won't replace any core files :)

Then you need to go to your site admin panel
http://WWW.YOURWEBSITE.COM/STORE/admin/

Then go to Home-->System-->  Setting---> Insert --> Store--> Template


Choose template and click on save

Sunday, June 30, 2013

How to enable curl in xampp - Warning: CURL extension needs to be loaded for OpenCart to work! in xamp

Step 1:
At first close Xamp.
Browse and open the following 3 files

C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\php.ini

Step 2:

Uncomment the following line in your php.ini file by removing the semicolon (;).

;extension=php_curl.dll
After that it will look something like something below-

extension=php_curl.dll

Step 3:

Restart your Apache server.

Step 4:

Check your phpinfo() to see whether curl has properly enabled or not.

Enjoy using curl() library.

Sunday, May 12, 2013

How to change-the-wordpress-blog-text-editor-font-size in wordpress

Some one wants to change the font size of wordpress text editor for easy to see at time of posting. Here I tell you the procedure How to change-the-wordpress-blog-text-editor-font-size in wordpress
Go to  /wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
on line 40 you can see that


/* WordPress styles */
body {
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-size: 13px;
line-height: 19px;
color: #333;
margin: 10px;
}

Change the font size as your need. Change also line height, which will be greater than the font-size.

Visit my website: www.bestcareerbd.com

Tuesday, May 7, 2013

popular post by category or category.php


Add this on functions.php:


function getPostViews($postID){
    $count_key = 'post_views_count';
    $count = get_post_meta($postID, $count_key, true);
    if($count==''){
        delete_post_meta($postID, $count_key);
        add_post_meta($postID, $count_key, '0');
        return "0 View";
    }
    return $count.' Views';
}
function setPostViews($postID) {
    $count_key = 'post_views_count';
    $count = get_post_meta($postID, $count_key, true);
    if($count==''){
        $count = 0;
        delete_post_meta($postID, $count_key);
        add_post_meta($postID, $count_key, '0');
    }else{
        $count++;
        update_post_meta($postID, $count_key, $count);
    }
}

The add this when the loop starts within single.php:

<?php setPostViews(get_the_ID()); ?>

Add this where you want to show page view

<?php echo getPostViews(get_the_ID()); ?>



Popular post: for all categories
 <?php

query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&showposts=2&offset=4');
if (have_posts()) : while (have_posts()) : the_post(); ?>
               
                <li class="liHeadList"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                <?php
endwhile; endif;
wp_reset_query();
?>



popular post: for all category.php 

<?php
$category = get_the_category();
query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&showposts=3&&category_name='.$category[0]->cat_name.'&cat=$category_id');
if (have_posts()) : while (have_posts()) : the_post(); ?>              
                <li class="liHeadList"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>              
                <?php
endwhile; endif;
wp_reset_query();
?>

Wokiee React eCommerce Template