I want to add category slug in posts url

Go to permalink settings and select “Custom Structure” option listed on end. Then write /%category%/%postname%/. Save changes and now your post url will have category name too.

Get related posts matching most of the provided tags using WP_Query

There is no direct way of getting posts matching most of these tags using WP_Query. The usual documented methods: If you want posts matching any of these tags, you may use: $args = array( ‘post_type’ => ‘post’, ‘tag_slug__in’ => array( ‘poetry’, ‘motivational’, ‘attitude’, ‘rules’, ‘lines’, ‘sigma’, ‘inspirations’ ) ); $query = new WP_Query( $args ); … Read more

Disable “Quick edit” for roles in WP dashboard

I hope you need to disable “Edit” and “Quick Edit” for non-admin roles. So you can modify your code as follows function remove_quick_edit( $actions ) { unset($actions[‘edit’]); unset($actions[‘inline hide-if-no-js’]); return $actions; } if ( ! current_user_can(‘manage_options’) ) { add_filter(‘post_row_actions’,’remove_quick_edit’,10,1); }

How to add paraent in Blog post URL in wordpress

You can set this in your WordPress settings. Go to your Permalinks settings (WP Admin → Settings → Permalinks) and select ‘Custom Structure’. It should display your current structure in the text box next to it. Now, add /blogs in front of what is in the text box. And then Save. See screenshot for reference

Admin notice on wp_insert_post

Hooks cannot be added directly inside functions. Using do_action, you can invoke a custom hook. In your case try out the below solution: add_action( ‘wp_insert_post’, ‘automate_intercom’, 10, 3 ); function automate_intercom( $post_id, $post, $update ) { if ( $post->post_status == ‘publish’ && $post->post_type == ‘help-center’ ) { $someCondition = ”; if ( $someCondition !== ” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)