Saturday, March 7, 2015

Convert html , css template to wordpress

Basic file layout for blog

  1.  insid wordpress>> wp-content >> themes >>our project >> index.php -> when post page is set from settings >> Reading >> Front page displays , it executes index.php where we should set up layout of the page like 

     - <?php get_header('blog'); ?>  :- it will look for header-blog.php file executes content in it.

    -  <?php get_template_part('loop'); ?> :- it will look for loop.php file and executes content in it.It should contain the code for displaying all the posts

    -  <?php get_footer(); ?> :- it will look for footer.php file executes content in it.

   -  single.php :- it should contain the code for displaying one blog post with comments_template(); this       comment template will look for comments.php which should contain the code for displaying all the    comments for one post. 


- code snipped for including thumbnail image in php file
<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>
                 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
                                                                         <?php the_post_thumbnail();  ?>
                 </a>
 <?php endif; ?>
- we can set thumbnail image  for posts from wordpress admin panel , by using Set Featured Image on edit post option on bottom left side.


Learning wordpress from scratch:
https://www.youtube.com/watch?v=GHTZn3atTcM

https://www.youtube.com/watch?v=sd0grLQ4voU

Customize color picker:

http://buildwpyourself.com/building-theme-color-options-customizer/

https://www.youtube.com/watch?v=8OBfr46Y0cQ

https://www.youtube.com/watch?v=dwxIdLSK22o

http://themefoundation.com/wordpress-theme-customizer/

Embedding twitter in wordpress
https://www.youtube.com/watch?v=MB70_RTCZOU

How to develop wordpress plugin
https://www.youtube.com/watch?v=GAwPa4fP90c

Embeding custom code using shortcode in page or post
http://codex.wordpress.org/Shortcode_API


Embedding widgets in wordpress
https://www.tipsandtricks-hq.com/how-to-add-widgets-to-wordpress-themes-footer-1033

Wordress error: can connect to database server but cannot select the database in localhost:
Solution : Navigate to WordpressProject >> wp_config.php and change the single quote of database name, user name.

Hosting wordpress website using openshift
https://developers.openshift.com/en/php-wordpress.html


Ninja forms plugin
http://wpninjas.com/add-custom-css-to-your-ninja-forms/

https://www.youtube.com/watch?v=mA9ITyh8uRg

https://www.youtube.com/watch?v=mA9ITyh8uRg

How to add twitter feed widget to your wordpress blog.
https://www.youtube.com/watch?v=76lxy9xCA2c

How to develop wordpress plugin from scratch
https://www.youtube.com/watch?v=PCVk1hzjJ4c&index=2&list=PLQM9yk66qO4HdE3EcSNpVAQaTKxf2NXSo


Truncate post content while displaying list of posts
https://wordpress.org/support/topic/truncating-the-content-output
Instead of using the_content(); use following
<?php the_excerpt();
<p><a href="<?php the_permalink();?>"><?php _e('read more &hellip;');</a></p>

// Custom excerpt length , edit functions.php
function my_excerpt_length($length) {
 return 100; // Or whatever you want the length to be.
}
add_filter('excerpt_length', 'my_excerpt_length');


How to add video thumbnail in posts?
use plugin featured video plus plugin 
https://www.youtube.com/watch?v=2wuP723zCdE

How to add customer login feature in wordpress website?
list of plugins for adding customer login feature
http://wpdevshed.com/members-only-on-your-wordpress-website/

http://premium.wpmudev.org/blog/20-wordpress-plugins-for-improved-user-login-and-registration/

No comments:

Post a Comment