How to get current page slug and post slug

get current page slug get current post slug if you want to compare current page and post slug

How to hide media uploads by other users in WordPress

This code hides all posts and media that do not belong to the currently logged in author (you can change it to apply to other user roles). It also fixes the post and media count on the filter [...]

How to insert contact form 7 data into mysql database in wordpress

First you need to Create a table and add fields example “contacts” and table fields are belowidform_idfirst_namelast_nameemail_idphone_nosubjectmessagedate if you not able to create [...]

How to limit acf field value in WordPress

If you want to limit the ACF field character output. you can use below code. 1) Make sure to use get_field instead of the_field to get the value. 2) I would recommend using the built in WP [...]

How to Make Featured Image Responsive in WordPress

Featured images are not responsive out of the box in WordPress. There is a function add_image_size() to make copies of the featured image with different dimensions, but when it comes to viewing [...]

How to remove custom post type slug from wordpress

First, you need to filter the permalink for your custom post type so that all published posts don’t have the slug in their URLs:

How to Send an Email on ACF Form Submission

The following code emails a particular person whenever an ACF Form is submitted. It’s a slight modification of the example at the bottom of this page. Since I’m dealing with three forms with [...]

How to set character limit on the_content() and the_excerpt() in wordpress

You could use a WordPress filter callback function. In your theme’s directory, locate or create a file called functions.php and add the following in: Use the code in your function.php or [...]