WordPress plugin require_once unexpected

This is a long shot but is there any possibility your text editor is encoding the file in UTF-8 with BOM? Try to save / encode the file in UTF-8 without BOM and see if the issue is gone. As for your plugin header, while it doesn’t totally follow the recommended format your header should … Read more

I would like to remove date display on photo preview

There are two possible solutions: CSS edit and File edit. CSS edit(Not the best solution, but works) .post-blocks .block-info span { display: none; } It is not possible for us to write the file edit code since we don’t have access to your admin panel. Install WhatTheFile plugin to find out the template that renders … Read more

Approve users posts before publish

// Add the content to $post as an array $post = array( ‘post_title’ => $title, ‘post_content’ => $description, ‘post_category’ => $_POST[‘cat’], // Usable for custom taxonomies too ‘tags_input’ => $tags, ‘post_status’ => ‘draft’, // Choose: publish, preview, future, etc. ‘post_type’ => $_POST[‘post_type’] // Use a custom post type if you want to ); wp_insert_post($post); // … Read more

How to create plugin auto create page wordpress?

The following hook is called when the plugin is activated from the dashboard. register_activation_hook( __FILE__, ‘myplugin_activate’ ); function myplugin_activate() { //create a variable to specify the details of page $post = array( ‘post_content’ => ‘content’, //content of page ‘post_title’ =>’title’, //title of page ‘post_status’ => ‘publish’ , //status of page – publish or draft ‘post_type’ … Read more

same user role or copy the user role to be same as the other role

Contributor has the following capabilities delete_posts edit_posts read You can create the “Seller” role to have same capabilities as Contributor add_role( ‘seller’, __( ‘Seller’ ), array( ‘read’ => true, ‘edit_posts’ => true, ‘delete_posts’ => true, ) ); Warning from codex NB: This setting is saved to the database (in table wp_options, field wp_user_roles), so it … Read more