I would like to allow users to create an account and add free listings with NO paid options

I am just wondering if it is possible to allow users to register and submit free listings with no paid options?

If so would I still need to go through the process of adding WooCommerce? Trying to avoid doing that.

In the demo video it did not show the free membership being attached to any woo product so I am hoping I could avoid it.

Thanks

Hi @Jrjmkey,

What you describe is the base HivePress Plugin.

The monetisation models come in through various extensions like Paid Listings, Memberships, Marketplace, etc.

You won’t need to use WooCommerce (or Stripe) unless you use certain extensions that are built around them.

I hope this helps!

Cheers,
Chris :victory_hand:

Thanks Chris,

I was hopeful I could allow front end submission of free listings.

I took the steps I believed I would need to in the back end.

I have a login and submit listing button showing up.

I can login and create a new user, but no matter what I do when I click the submit listing button it just refreshes the page and nothing happens.

On my submit listings page I have the [hivepress_listing_submission] shortcode. But as nobody can access that page it’s obviously not doing anything.

I should also point out that when I right click the Submit listing button it does reference the correct url in there.

Any thoughts?

Hi @Jrjmkey,

Are you using a third-party theme, and/or have any third-party plugins installed, as well?

Try temporarily deactivating any third-party plugins, and check if the issue is fixed. Else, it’s likely an issue with your theme, if you’re not using an official HivePress one.

The submit listing page isn’t something you create yourself. It’s added by HivePress and you can add different fields in Listings > Attributes.

I hope this helps!

Cheers,
Chris :victory_hand:

I am actually using Listinghive as the theme

The only other plugins installed as it’s a very new install, are an avatar creator, wp forms and an import plugin.

I have disabled them all.

But that had zero impact same issue continues.

You know now that I am thinking about I have a feeling I might have caused this.

I changed the add a listing function to call the built in Gutenberg editor so I can use all the functions there instead of the little default bar. I am thinking that perhaps the button is trying to call the default add a listing page which is really not available due to the changes to the functions.php page

Hi @Jrjmkey,

I see. Please try temporarily removing the customisations you mentioned and check if this resolves the issue for you.

Presuming it does, then if you can explain what you’re trying to implement either myself or someone else in the community might be able to offer advice.

Cheers,
Chris :victory_hand:

Hey Chris,

Indeed I removed the code I added to the functions.php and it workded exactly as it was designed to do.

The code I added that worked as intended for the logged in admin is:

function cw_post_type() {
    register_post_type( 'hp_listing',
        array(
            'labels' => array(
                'name' => __( 'hp_listings' ),
                'singular_name' => __( 'hp_listing' )
            ),
            'has_archive' => true,
            'public' => true,
            'rewrite' => array('slug' => 'hp_listing'),
            'show_in_rest' => true,
            'supports' => array('title', 'editor', 'thumbnail', 'excerpt')
        )
    );
}
add_action( 'init', 'cw_post_type' );

I incorrectlly hoped/assumed it would work for anyone that logs in. But I am assuming that as a logged in Non Admin user doesn’t have the same rights this editor option is not available to them.

If I log in as a user it allows me to login, see the profile and when I click the add listing button it takes me to the base editor with just a basic text box. Not something that will work for the folks inputting listings on this site.

Long story short is there a way to make my admin “fix” work for those regular folks as well??

TIA for any suggestions

J

Hi @Jrjmkey,

Sorry, I’m a really confused now. It looks like you’re attempting to register a post type that HivePress has already created, which is likely why you’re running into odd issues.

By default, when a user registers they are assigned the subscriber role in WordPress. Once they publish a listing, they are now considered Vendors in HivePress and change to the Contributor role automatically.

The ‘Add a Listing’ button and page to enter the listing details are all built-in to HivePress.

It sounds like your trying to reinvent the wheel. Perhaps you haven’t fully explored all of the options in the backend of HivePress > Settings.

To add new fields to the form, create a new attribute In Listings > Attributes, which is also found in the backend of WordPress.

If you can elaborate on what you’re trying to create, that would be useful. Adding some screenshots to your reply will also help myself and others under what you’re seeing.

I hope this helps!

Edit: You may find the documentation in the help center useful, too.

Cheers,
Chris :victory_hand:

Hi there again.

Sorry for the confusion. I looked high and low to find what I was looking for and yes I spent hours seaching the forums to see if there was anyone doing what I was seeking. That code was the only thing that allowed posts they way the owner wanted them.

I have attached three imagesm the first one is how my add listing screen looked without any code at all.

This was for free users. Nobody is being charged so it’s just creating an account and logging in.

The image below is what the add listing screen looked like without any code chanages. Better as there is some ability there to tinker with the text, but still missing the main feature she wants.

This final image is how it looks when you click add listing with the code added and using the admin account. This is what she wanted, it allows her to use the default Gutenberg editor and also then allows her the ability to use her Ultimate blocks plugin.

I assumed (wrongly so obviously) that if that code was in and it was working as it has been for the admin to add stuff, it would work the same for free users. Which is obviously did not

So that is where I am and what I am trying to do. Sorry for the lack of detail to this point.

J

Hi @Jrjmkey,

Thanks for the screenshots and extra details.

While I think I somewhat better understand what you’re trying to achieve now (for your client?), this looks like a highly customised solution and therefore will require the official staff to respond once they have a chance to see your topic. - (I’m not staff, just happy to help where I can)

The lead developer, @ihor, will most likely be able to offer you some advice or guidance.

PS: If you do manage to achieve this, it would be cool if you would be willing to share your final code with the community. I love to see what others have managed to achieve with HivePress - it’s great inspiration! :slight_smile:

Cheers,
Chris :victory_hand:

Hey,

I appreciate your efforts, I had a feeling this was going to be a tough one. I have searched high and low for a solution that works nothing so far.

But yes by all means if or should I say “when” I get a solution I will be happy to share it with the group should someone else down the road need to the same setup.

Take care,

J

1 Like

Hi @Jrjmkey,

It’s great to hear that, and I look forward to seeing what you manage to do!

In the meantime, if your client is mainly wanting more text option, this might serve as a temporary solution:

Cheers,
Chris :victory_hand:

Hey,

Appreciate it, but no they are hoping to have the full Gutenberg editor for front end users like they currently have logged in admin users. Their end goal is to allow use of the Ultimate blocks plugin on the back end for free users as it is currently for admin uers

Hey @Jrjmkey,

This has got me thinking about how customizable HivePress could really be. Anyway, I asked my AI for their approach. I’ve not tested this, but it might offer you some valuable insights and help guide you in the right direction.

Do keep us updated with your findings!


AI:

Short answer: HivePress doesn’t provide a Gutenberg-based front-end submission screen, so the practical way to give end-users the full block editor is to route them into a locked-down wp-admin screen for the hp_listing post type, make sure that post type is Gutenberg-enabled, and replace the normal “Add Listing” flow with a redirect to post-new.php?post_type=hp_listing. You keep all HivePress logic (attributes, pricing, booking, etc.) while giving users the real block editor.

Below is a drop-in mini-plugin that does exactly that:

Ensures hp_listing supports Gutenberg (show_in_rest + editor support).

Forces the block editor for hp_listing.

Replaces the HivePress “Submit Listing” page with a safe redirect to the Gutenberg editor.

Locks down wp-admin for vendors so they only see Listings and Media (optional, tweak as you like).

Grants the vendor role the capabilities needed to create/edit listings and upload media.

Save as wp-content/plugins/hp-gutenberg-submit/hp-gutenberg-submit.php and activate.

<?php
/**
 * Plugin Name: HP Gutenberg Submit (Frontend → Gutenberg)
 * Description: Replace HivePress submit page with Gutenberg editor for end users, while keeping admin locked down.
 * Version:     1.0.0
 * Author:      You
 */

if ( ! defined( 'ABSPATH' ) ) { exit; }

/**
 * 1) Make sure the HivePress listing post type is Gutenberg-ready.
 *    We do this without re-registering the CPT by filtering args.
 */
add_filter( 'register_post_type_args', function( $args, $post_type ) {
	if ( 'hp_listing' !== $post_type ) {
		return $args;
	}

	// Enable REST (required for block editor) and ensure editor support is present.
	$args['show_in_rest'] = true;

	$supports = isset( $args['supports'] ) ? (array) $args['supports'] : [];
	$supports = array_unique( array_merge( $supports, [ 'title', 'editor', 'thumbnail', 'excerpt' ] ) );
	$args['supports'] = $supports;

	return $args;
}, 10, 2 );

/**
 * 2) Force the block editor for hp_listing.
 */
add_filter( 'use_block_editor_for_post_type', function( $use_block_editor, $post_type ) {
	if ( 'hp_listing' === $post_type ) {
		return true;
	}
	return $use_block_editor;
}, 10, 2 );

/**
 * 3) Replace the HivePress "Submit Listing" flow with a redirect to Gutenberg.
 *    If you still want the multi-step form for metadata, keep that page; otherwise this sends users straight to post-new.
 *
 *    This hook runs when HivePress renders the submit page; we intercept and redirect.
 */
add_filter( 'hivepress/v1/templates/listing_submit_page', function( $template ) {
	// Only redirect logged-in users who can create listings.
	if ( is_user_logged_in() && current_user_can( 'edit_hp_listings' ) ) {
		wp_safe_redirect( admin_url( 'post-new.php?post_type=hp_listing' ) );
		exit;
	}
	return $template;
}, 0 );

/**
 * 4) Optional: redirect the "Edit listing" front-end endpoint into wp-admin post edit as well.
 *    This makes the entire listing workflow live in Gutenberg.
 */
add_action( 'template_redirect', function() {
	if ( ! is_user_logged_in() ) { return; }

	// If you're using a dedicated "edit listing" endpoint (e.g., /account/listings/edit/123),
	// you can parse the query and redirect. HivePress sets 'listing_edit_page' internally,
	// but a safe generic approach is to watch for ?hp_listing_id=<id> on your custom link.
	if ( isset( $_GET['hp_listing_id'] ) ) {
		$post_id = absint( $_GET['hp_listing_id'] );
		if ( $post_id && get_post_type( $post_id ) === 'hp_listing' && current_user_can( 'edit_post', $post_id ) ) {
			wp_safe_redirect( admin_url( 'post.php?post=' . $post_id . '&action=edit' ) );
			exit;
		}
	}
});

/**
 * 5) Give the vendor role the caps they need (on activation).
 *    Adjust role slug if your vendor role name differs.
 */
register_activation_hook( __FILE__, function() {
	$role = get_role( 'vendor' ); // HivePress usually creates a 'vendor' role.
	if ( ! $role ) { return; }

	$caps = [
		'read',
		'upload_files',
		'edit_posts',
		'edit_hp_listings',
		'edit_published_hp_listings',
		'publish_hp_listings',
		'delete_hp_listings',
		'delete_published_hp_listings',
	];

	foreach ( $caps as $cap ) {
		if ( ! $role->has_cap( $cap ) ) {
			$role->add_cap( $cap );
		}
	}
});

/**
 * 6) Lock down wp-admin for vendors so it feels like a “front-end” editor.
 *    Hide everything except Listings and Media. Tweak as needed.
 */
add_action( 'admin_menu', function() {
	if ( ! current_user_can( 'vendor' ) ) { return; } // cheap check; refine if needed

	// Remove menus vendors don't need.
	remove_menu_page( 'index.php' );                    // Dashboard
	remove_menu_page( 'edit.php' );                     // Posts
	remove_menu_page( 'edit.php?post_type=page' );      // Pages
	remove_menu_page( 'edit-comments.php' );            // Comments
	remove_menu_page( 'themes.php' );                   // Appearance
	remove_menu_page( 'plugins.php' );                  // Plugins
	remove_menu_page( 'users.php' );                    // Users
	remove_menu_page( 'tools.php' );                    // Tools
	remove_menu_page( 'options-general.php' );          // Settings
	remove_menu_page( 'woocommerce' );                  // WooCommerce (if present)
	remove_menu_page( 'edit.php?post_type=product' );   // Products (if present)
	// Keep: Media and hp_listing (registered by HivePress)
}, 99 );

/**
 * Optional: keep vendors out of the main wp-admin dashboard and land them directly on "Add Listing".
 */
add_action( 'admin_init', function() {
	if ( ! is_user_logged_in() || ! current_user_can( 'vendor' ) ) { return; }

	$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;

	// If they hit the Dashboard or disallowed screens, push them to Add Listing.
	if ( isset( $_GET['page'] ) || ! $screen ) {
		return;
	}

	$allowed_screens = [
		'upload',                // Media Library
		'media',                 // Media edit
		'edit-hp_listing',       // All Listings
		'hp_listing',            // Listing edit
	];

	if ( ! in_array( $screen->id, $allowed_screens, true ) ) {
		wp_safe_redirect( admin_url( 'post-new.php?post_type=hp_listing' ) );
		exit;
	}
});

/**
 * 7) Nice-to-have: change the “Add Listing” button/link anywhere on site to point to Gutenberg.
 *    If you output a custom “Add Listing” link, use this helper.
 */
function hp_gutenberg_add_listing_url() {
	return admin_url( 'post-new.php?post_type=hp_listing' );
}

How this works (and why it’s the least painful path)

The block editor only runs within wp-admin for a given post type. There’s no supported, stable “frontend Gutenberg” UI you can drop into a HivePress template. Embedding the editor in a public page is possible but brittle and a huge build.

HivePress already stores the long description in the post content, so the Gutenberg editor maps perfectly to that field. All the structured pieces (attributes, location, price, booking) still live in HivePress meta and its booking extensions. On the wp-admin edit screen, those appear as meta boxes beneath/alongside Gutenberg.

By redirecting the submit page you keep the user journey simple: “Add Listing” → block editor → Publish. You can still keep the front-end list/edit table if you want, and just jump into the editor when creating or editing.

  • Notes / tweaks

If your vendor role slug isn’t vendor, change it in the plugin.

If you need to keep HivePress’s front-end steps for some attributes, you can do a hybrid flow: use Gutenberg for the main content and featured image, and keep a minimal front-end step for any must-have structured fields. In that case, remove (or conditionally bypass) the submit-page redirect block.

If attributes aren’t showing as meta boxes in Gutenberg, make sure HivePress is adding them on the edit screen in your build. Most do; if not, you can register your own meta boxes that read/write the same meta keys HivePress uses.

For a super clean feel, pair this with an admin-theming plugin or a small CSS file to declutter wp-admin for vendors.


I hope this helps!

Cheers,
Chris :victory_hand:

Quick follow up, I actually took your advice and created a small plugin that seems to be working for my needs. It does allow the logged in user limited access to the WP back end but nothing that is a problem for my purposes. Most importantly it allows the logged in user access to full WP Gutenberg editor for adding listings. It’s been working great for a week or so now.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.