Join our new community forum for support & discussion

Join Now

Home Support Extensions Paid Listings “/submit-listing” page php-file

“/submit-listing” page php-file

  • Author
    Posts
  • ralphnohe

    Hi HivePress tea,
    Where can I find the php template file for the “submit-listing” page?
    Thanks!

    ihor developer

    Hi,
    There’s no single PHP file, there are template parts and blocks combined into a single template, also the submit listing page consists of multiple subpages, for example “Select Category”, ‘Add Details”, etc. and each page has its own template. Here’s a sample code snippet showing how to insert custom content into the “Add Details” page https://hivepress.io/support/topic/how-to-add-custom-button-to-submit-listing-page/#post-14508 Hope this helps.

    ralphnohe

    hi ihor,

    what I’m trying to do is to add a shortcode to the submit listing page, so that users who aren’t logged in have two options: 1) sign in (if account exists), 2) register (here the shortcode would apply, which is simply inserting a PMP Pro membership selection block).
    Right now, I have added the “submit-listing” link in my menu. Once a non-logged-in user clicks that link, he is redirected to the following URL:
    https://www.MYSITE.com/account/login/?redirect=https%3A%2F%2Fwww.MYSITE.com%2Fsubmit-listing%2F

    The page then displays only the sign-in form, and I’d like to add the shortcode right below that.
    How can I accomplish that?

    Thanks, I appreciate your great support.

    ralphnohe

    p.s. I intend to insert
    echo do_shortcode( 'shortcode_here');
    The main is question is only: where exactly. Thanks!

    ihor developer

    Please try this PHP snippet, it adds custom content below the login form:

    add_filter(
    	'hivepress/v1/templates/user_login_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'page_content' => [
    						'blocks' => [
    							'custom_content' => [
    								'type'    => 'content',
    								'content' => 'custom content here',
    								'_order'  => 100,
    							],
    						],
    					],
    				],
    			]
    		);
    	}
    );
    ralphnohe

    Thank you Ihor, this works, appreciate it!

Viewing 6 posts - 1 through 6 (of 6 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.