Hide comment on media attachment page

wordpress

Add Below code in function.php

 

Read More

Remove post type slug from url and replace with terms

wordpress

Copy below code in your function.php file.

Create post type with url taxonomy term

“our_homes” taxonomy terms and  “property” Post type.
you must be assign category else it will error

 

 

Read More

Update the_excerpt word length

wordpress

Using given code you can increase or decrease wordpress default function length.

the_excerpt()

you can just coppy and past below code in function.php file and update text length using update return value.

 

Read More
Wp to add custom field display in admin post list

Wp to add custom field display in admin post list

wordpress

You can add any custom field in your admin post type / page / custom post type list using below code.

Below code example for display event start date in event post type admin list.

here in below example “event” is custom post type and “event_date_start” is custom field.

 

Read More

wordpress 4.7.3 version for security

wordpress

You can see mor update on wp site.
it will support follow 6 task.

  • Cross-site scripting (XSS) via media file metadata.
  • Control characters can trick redirect URL validation.
  • Unintended files can be deleted by administrators using the plugin deletion functionality.
  • Cross-site scripting (XSS) via video URL in YouTube embeds.
  • Cross-site scripting (XSS) via taxonomy term names.
  • Cross-site request forgery (CSRF) in Press This leading to excessive use of server resources.

DOWNLOAD wp 4.7.3 here

WordPress 4.7.3 Security and Maintenance Release

Read More

Woocommerce to add custom shipping

wordpress

You can add custom shipping or fees on your woocommerce cart using below code.
make your additional charge add in eCommerce cart page add in total value based on cart or based on per product.
just add below code in your function.php file and see magic in cart page.

 

Read More

Contact form 7 data move to third party form

wordpress

You can post your contact form 7 data to third party form. add below code in function.php.  and add js in your js file. in js just change your id and class as per your requirement.

Third party form submition

when you use below code default contact form7 thankyou message not working so you need to java script to settimout() to add custom message using given script.

 

Read More

Remove css and script on specific wordpress page

wordpress

On your wordpress blog you have multiple style and script from plugin or them but you have no need to display all style and script on all page you can follow below step to  dequ.

you can just fien enque script name and dequeu it on specific page.

Read More

Woocommerce to hide specific category post on your shop page

wordpress

When you make shop and you have lot of produc and you need to hide some product from all list you just add below code in function.php to see magic.

Add category slug into array and you can add multiple category also like array(‘child1′,’child2′,’….’)

Read More