Wordpress

11
Feb

Hide/Remove Toolbar on front end for logged in users?

add_action(‘set_current_user’, ‘csstricks_hide_admin_bar’); function csstricks_hide_admin_bar() { if (!current_user_can(‘edit_posts’)) { show_admin_bar(false); } }

11
Jan

Display Child Page title and Image In WordPress

<?php $child_pages = $wpdb->get_results(“SELECT *    FROM $wpdb->posts WHERE post_parent = “.$post->ID.”    AND post_type = ‘page’ ORDER BY menu_order”, ‘OBJECT’);  ?> <?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); $i+=count($pageChild); ?> <a href=”<?php echo  get_permalink($pageChild->ID); ?>” rel=”bookmark” title=”<?php echo $pageChild->post_title; ?>”> <?php echo get_the_post_thumbnail($pageChild->ID, ‘full’); ?></a><br/> <h3><a href=”<?php echo  get_permalink($pageChild->ID); ?>” rel=”bookmark” title=”<?php

Read more

10
Sep

WordPress Function

WordPress Function Jquery Include     <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ?> 2. Thumbnail Image <?php the_post_thumbnail();?> <?php  the_post_thumbnail(‘thumbnail’);  ?> <?php  the_post_thumbnail(‘medium’);   ?> <?php the_post_thumbnail(‘large’);      ?> <?php the_post_thumbnail(‘full’);?> <?php the_post_thumbnail( array(100,100) );?> 3. Get Template Url      <?php get_template_directory(); ?> <?php get_template_directory_uri(); ?>

1
Aug

How to Prevent Your WordPress Website from Being Hacked

How to Prevent Your WordPress Website from Being Hacked Keep your WordPress website updated with the latest version of WordPress.  Wordpress is regularly upgraded with new functionality and wity security measures that help stop hackers. Use complex usernames and passwords as described above. Install security plugins such as Better WP Security.  It covers most of the wordpress vulnerabilities mentioned earlier in this

Read more

27
Jul

Woocommerce Category, Image , Description Display

<?php $all_categories = get_categories( ‘taxonomy=product_cat&hide_empty=0&hierarchical=1’ ); foreach ($all_categories as $cat) { //print_r($cat); if($cat->category_parent == 13) { $category_id = $cat->term_id; $thumbnail_id     = get_woocommerce_term_meta( $cat->term_id, ‘thumbnail_id’, true ); $image = wp_get_attachment_url( $thumbnail_id ); /*echo ‘<a href=”‘. get_term_link($cat->slug, ‘product_cat’) .’”><div>’. “Read more” .'</div></a>’;*/ ?> <li style=”width: 183px;”> <div> <h3><?php  echo $cat->name; ?></h3> <div><img src=”<?php echo $image; ?>” alt=”<?php $cat->name; ?>” width=”120″ height=”120″

Read more

22
May

How to Install WordPress

1 Checking to ensure that you and your web host have the minimum requirements to run WordPress. 2 Download the latest release of WordPress. 3 Unzip the downloaded file to a folder on your hard drive. 4 Be prepared with a secure password for your Secret Key 5 Print this page out so you have it handy during the installation.

Read more