Author: NST

Myself Narender Singh Thakur ( NST ) and i share my Experience/Knowledge and Tricks for folks and beginners to solve their issues while making websites through this Planet.

Transparent Gradient or fade effect to image in Photoshop !

gradient

Here are simple steps to do that any images..

1) Add new file in Photoshop or open the image in photoshop to add fade or transparent effect..i added this one..

add image in photoshop

 

2) Right click on that layer and choose option “Resterise Layer” like this one..

restrise-mode in photoshop layer

 

3) Than follow these steps.. (1) Click on that icon > (2) Click on that Gradient icon left side > (3) Click on that drop-down and choose first one option from there as like (4) in screenshot.

transparent layer photoshop

 

4) Now on the right side corner of the image click and Drag curser to right side and leave there.. like this screenshot..

photoshop hold tool

 

5) After 4th step your image will be like this..

photoshop faded image

 

You can play with that to make different fade effect’s to other corners…

Thanks 🙂

Add metabox to custom post type in wordpress !

Here is the way to Add metabox to custom post type in wordpress ..

1) Add taxonomy to existing or custom post type ..

taxonomy add in custom type in wordpress

 

2) You can add by using this tag… “Quality” is a Name of the taxonomy and “movie” is a post type. customize this as per your’s need.

<?php
register_taxonomy(
'Quality',
'movie',
array(
'hierarchical' => false,
'label' => __( 'Quality', CURRENT_THEME ),
'singular_name' => __( 'Quality', CURRENT_THEME ),
'rewrite' => true,
'query_var' => true
)
);
?>

3) Thanks 🙂

For any help Contact me here..

Trim the word from the title or content in wordpress or php !

Sometime we want to show only some words from the title or content of page/posts in wordpress.
In your php query you can trim title by using this function.

Here i trim the words of post title to show only first 3 words.. you can change as you need..instead of title you can apply this for post content too.

For Title
<?php echo wp_trim_words( get_the_title(), 3 ); ?>

 
For Content
<?php echo wp_trim_words( get_the_content(), 20 ); ?>

 

For any help contact me here

Transparent color or layer on image in Photoshop !

Add image to Photoshop which one you want to add fade layer on that than follow these steps…

1) According to screenshot below.. (1) Double click on layer than click on OK.

photoshop unlock image layer

 

2) As per below screenshot.. Again double click on that layer like 1 and do like screenshot steps..

transparent layer photoshop

 

3) Change color and opacity as per your need.

Thanks 🙂

How to create custom post type in wordpress ?

Add this code to your website theme functions.php file..

<?php
function nst_custom_post() { register_post_type( 'Movie', array( 'labels' => array( 'name' => __( 'Movie' ),
'singular_name' => __( 'Movie' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'movie'),
'supports' => array('title', 'editor','thumbnail','excerpt','custom-fields'),
)
);
}
// Hooking up our function to theme setup
add_action( 'init', 'nst_custom_post' );
?>

 

Here is the preview of that code… you can change name as per your need.

custom post type in wordpress

 

 

If wp_redirect() function not working in wordpress !

wp_redirect

If that’s not working than do that by Jquery method. Add this to footer.php file.

You can add your conditions ..mine example is if user not logged in and category name is solution than redirect to work page…
<?php if ( !is_user_logged_in() && in_category('solutions')){ ?>
<script>
window.location='http://nstplanet.com/nst-work/';
</script>
<php } ?>

You can comment below if you stuck in to make any conditions.

How to make owl carousel to slide smoothly ?

Here is the solution to make owl slider to slide image smoothly.. in wordpress or html scripts.

To make owl slider to slide image smoothly.. just add this smartSpeed attribute to owl function..

$('#nst-video').owlCarousel({
items: 2,
loop: true,
margin: 10,
nav: true,
autoplay:true,
smartSpeed: 1000,
autoplayTimeout:4000,
autoplayHoverPause:false
});

I hope this helps you… if you need more help then you can contact me.

Thanks

Change Breadcrumb text in Shopify !

  1. Login to your shopify Store and goto Online Store.
  2. Click on “Edit Language” of active template …language change in shopify
  3. The window will be like this..checkout page text or all over text change in shopify
  4. Click on checkout Tabs to change default text..
  5. It was before ” Cart > Customer information > Shipping method > Payment method” and now ..

shipping in shopify

 

Click to Chat