Join our new community forum for support & discussion

Join Now

Home Support Themes ExpertHive code to remove sidebar does’nt work

code to remove sidebar does’nt work

  • Author
    Posts
  • mccorbeil07

    Hi
    The code snippet I found here to remove the side bar on the listing page does’nt work.

    .hp-listing--view-page .hp-page__sidebar {display:none;}
    .hp-listing--view-page .hp-page__content {max-width:100%;flex-basis:100%;}

    Thx for helping me! πŸ™‚

    mccorbeil07

    Also I want to remove the sidebar of the category pages and I want to be able to sort my lists in alphabetical order. At the moment I just have “date” and “title”.

    Thank you πŸ™‚

    mccorbeil07

    Ho sorry! Just found that “title” option is actually the alphabetical order πŸ™‚

    Another question though: How can I add in the side bar custom contact informations like phone, website, address of my different “Fondations” in their listing: https://www.repertoirefondations.ca/listing/fais-un-voeu-quebec-make-a-wish-quebec/

    I can’t use the default side bar because it will show the same contact information to all my Fondations.

    Thank you in advance for your help! πŸ™‚

    ihor developer

    Hi,

    Please try adding custom attributes like Website, Phone, etc. in Listings/Attributes section and assigning them to the “Page (primary)” location, then each foundation will have these unique details and you will not have to hide the whole sidebar. Here’s an example with the Price attribute https://www.youtube.com/watch?v=A9c7va8gjoQ

    You can try using this CSS snippet to hide the sidebar on category pages, but this will hide the search filters and may require further customizations:

    .hp-template--listings-view-page .hp-page__sidebar {display:none;}
    .hp-template--listings-view-page .hp-page__content {max-width:100%;flex-basis:100%;}
    mccorbeil07

    Hi Ihor

    Thank you for your help, it works. But I want the Listing attributes (website, phone..) to be underneath the listing sidebar so this way I’ll be able to use the sidebar (text option) as a Title for my “contact information” which is “coordonnΓ©es” in French as shown in my screenshot here :
    example of what I need

    Thank you again for your great support!
    It is very well appreciated.

    Marie

    mccorbeil07

    Also it seems to have a bug with the “image” of the listing. It’s not possible to add a feature image and the “elect image” option react weirdly.

    ihor developer

    1. Please try using this PHP snippet, you can add it via the Code Snippets plugin:

    add_filter(
    	'hivepress/v1/templates/listing_view_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_attributes_primary' => [
    						'_order' => 1000,
    					],
    				],
    			]
    		);
    	}
    );

    2. The first image should be set as featured automatically, let me know if there’s some issue and it can be reproduced.

    mccorbeil07

    Ho nice, the code works fine, thank you so much!! πŸ™‚

    The first image doesn’t work though… unless I do something wrong. (?)
    Here are screenshots :
    http://studiocreatif.ca/image-backend.png
    http://studiocreatif.ca/image-frontend.png

    Also, for each Foundation I want to add a button for their website instead of a simple url.
    Like them: https://laccompagnateur.org/ressources/categorie/181-fondations
    You’ll find a screenshot here: http://studiocreatif.ca/website-button.png

    Thank you for your good support, be sure I will rate you well.

    ihor developer

    1. If you set the featured image via the back-end it’ll appear on the listing search and category pages, but if you mean showing it in the listing gallery this requires the front-end uploading.

    2. You can set a custom display format for the website attribute, for example https://hivepress.io/support/topic/is-it-possible-to-add-a-button-on-this-area/#post-12578 Then it’ll be displayed as a button.

    Alf

    Hello,

    In the sidebar I also have a block for the Actions, the Vendor and another one for the Map (I am use the Geolocation pluggin)

    I would like to try different ordering of these blocks. I have been able to apply your code to the Attributes and the actions, but I don’t know the name of the Vendor and Maps blocks to set their position. Could you facilitate?
    If there is a better option to do this, please, let me know.

    Regards,

    Alf

    mccorbeil07

    Thank you Ihor !

    1. It works front-end to add an image to the listing gallery, but I was wondering how to add an image (logo) to each foundation instead of the grey avatar.
    See what I mean here: http://studiocreatif.ca/avatar.png

    2. It works perfectly, thx!

    3. Because I will only use the listing gallery bloc to list the foundations on the Home page, I need a button “next page” option to avoid showing hundred foundations and scrolling down the page infinitely. So I need something like this: http://studiocreatif.ca/next-page-example.png
    Would it be possible to add a code that allows this kind of “next page number” to your listings bloc?

    4. Last thing, I need the attributes and categories to appear in the listing page under the description so the person who will register a new foundation back-end won’t have to write by hand all this infos in the description box, they will appear by default if they are checked in the sidebar listing. See my example here:
    http://studiocreatif.ca/Attributes-and-Categories-in-ListingPage.png
    http://studiocreatif.ca/sidebar.png

    Thank you again and again for your amazing support!
    Truly appreciated.

    Marie

    ihor developer

    @Alf Please try using this code snippet:

    add_filter(
    	'hivepress/v1/templates/listing_view_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_attributes_primary' => [
    						'_order' => 123,
    					],
    
    					'listing_map' => [
    						'_order' => 123,
    					],
    
    					'listing_vendor' => [
    						'_order' => 123,
    					],
    				],
    			]
    		);
    	},
    	1000
    );
    mccorbeil07

    Hello Ihor,
    I really need help with my last questions 1, 3 and 4.
    I’m stucked at the moment so I can’t go further with building the website.

    Thank you in advance,

    Marie

    ihor developer

    Sorry for the late reply, I guess I posted at the same time and didn’t see a new message.

    1. This is a vendor profile image, please try setting it for the vendor profile (sign in as a vendor and upload it in My Account/Settings section).

    3. It’s not possible to paginate the listing block, it’s used for displaying a few selected listings, but there are 2 workarounds: you can consider setting the Listings page as a home page in Settings/Reading, or add a custom button under the listings block with a link to the second page (so users will be redirected to the second page of the Listings page).

    4. Please try to assign attributes to the “Page (secondary)” area, then attributes will appear in the main content area on the left.

    mccorbeil07

    Thank you so much! No worries for the late reply I understand that we’re all very busy πŸ™‚
    So here’s what works and what don’t to fill my needs.

    1. To show the “vendor profil image” I need to display vendors in the HivePress settings but I don’t need (and don’t want) the Vendors profil to be seen through out the website simply because I don’t have any vendors. Is there a way to do all of this :
    β€’ Hide/disable the vendor Name (title) in the block primary because it looks like a repetition (see my image here: http://studiocreatif.ca/repetition.png )
    β€’ Hide/disable the vendor image in the sidebar listing
    β€’ Hide/disable the vendor page profil so it would be totally anonymous and only be used for the purpose of the logo. (vendor image profil)

    3. The Listings page as Home page works fine but I lose all the other content I added to the page. You can compare here with the initial home page I had created :
    https://www.repertoirefondations.ca/
    and the Listings page here: https://www.repertoirefondations.ca/fondations/
    Here’s the content I added backend that doesn’t show up frontend: http://studiocreatif.ca/ListingsPage-BackEnd.png
    I thought it would appear by default at the top of the page, before the listing, but it doesn’t.
    How can I fix this?

    4. It works, but is there a tweak to have them placed in the text area, after the text details and to get them bolder and/or in a different color?
    Like this: http://studiocreatif.ca/Attributes-Under-Text.png

    Thank you so much.

    Marie

    mccorbeil07

    Last thing: I don’t want to make an attribute option to appear as the principal and only one on the listing page. Most of the Foundations offer many options under one attribute so I want all of them to be listed in the listing page. At the moment there’s only the “principal option” that I’m not able to turn off. Is there a way?

    Thx again.

    ihor developer

    1. Please try using this CSS snippet to hide the vendor name:

    .hp-listing__vendor {display:none}

    You can also un-check the “Display vendors on the front-end” option in HivePress/Settings/Vendors section to hide vendor profile on the listing pages.

    If I understand correctly, you need a separate logo image for each listing, or it can match the profile image? By default the profile image is the same for all of the vendor listings https://experthive.hivepress.io/services/

    3. The Listings page works similarly to the Blog page in WordPress, it lists paginated items instead of the page content. Please consider adding a custom “View Foundations” button then (linked to the Listings page) under the Listings block, so users will be able to continue browsing/searching foundations.

    4. It’s possible to change its order with a simple PHP snippet, but displaying it in columns requires further customizations. Please let me know if changing its order works for you.

    5. If possible send more details, is there some option that is displayed even when it’s not selected?

    mccorbeil07

    Thank you for you quick reply. πŸ™‚

    1. The code snippet doesn’t work. Do I need to add extra php to the snippet?
    To help you better understand my needs, here are more detailed explanations. As there is no seller or owner who offers several services under the same name, I use Listings block title to display the Foundations names. As each Foundation is its own owner and the services it offers happens to be “its name”, this creates repetition in the listing block. So if the only way to get the logo displayed in the block is to create a Vendor profil for each Foundation I will do it but I need to hide the “vendor name” underneath the Title block (which is also “the name”) and also hide the “member since..” in the sidebar listing page. Here some details based on your ExpertHive theme :
    http://studiocreatif.ca/Explanations-FoundationVSVendor.png
    http://studiocreatif.ca/Adding-Feature-VendorProfile-Sidebar-Listing.png

    3. Cool, thx! I will do this.

    4. Yes please, I will try the columns displaying.

    5. No option appears if it is not selected, it is the opposite, there is only one option that appears even if there are several selected, and the option that appears is not necessarily the one that I checked as the primary option. Here more details backend:
    http://studiocreatif.ca/BackEnd-SearchDisplayOptions.png
    http://studiocreatif.ca/FondationMobilis-BackEnd-OptionsChecked.png
    http://studiocreatif.ca/Example-Options-Displayed.png
    And frontend:
    https://www.repertoirefondations.ca/listing/fondation-mobilis/

    Thx again!
    I need to say that your support is really impeccable, I want to go and rate your product.
    Where should I leave the review?

    Marie

    ihor developer

    1. Please try using this CSS snippet instead (add it in Appearance/Customize/Additional CSS):

    .hp-listing__vendor, .hp-vendor__registered-date {display:none!important}

    This should hide the vendor name and the registration date.

    4. You can try this snippet (add it via the Code Snippets plugin or to the child theme’s functions.php file), and try adjusting 123:

    add_filter(
    	'hivepress/v1/templates/listing_view_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_attributes_secondary' => [
    						'_order'  => 123,
    					],
    				],
    			]
    		);
    	},
    	1000
    );

    5. Please make sure that you checked “Allow multiple selection” for this attribute (in the Edit section) if you want it to allow storing multiple values, otherwise only the first one will be selected and saved on the front-end.

    Thanks! You can rate HivePress (the plugin that powers ExpertHive features) here https://wordpress.org/support/plugin/hivepress/reviews/

    mccorbeil07

    Hi Ihor

    Thx again for your help. Everything works fine with the code for the listing attributes but I need to modify few things:

    1. I want the attributes to be placed in 2 columns, the first one on the left would have 3 blocks one below the other, and the other column on the right would have only one block (featuring the “Age” option). The attribute options should be placed one below the other without a comma, just like in my example here: http://studiocreatif.ca/Example-2columns.png
    and here: http://studiocreatif.ca/2Columns_AttributeOptions.png

    2. Also, as you can see in my examples, I want to know how I can remove/hide the little green dash where there’s nothing beside and how to center the address.

    3. I need to be able to place the attribute options in a custom order, ages attribute in particular because the options are numbers and they must be placed in ascending order, for example: 0-6 months, 1 year, 2 years, 3 years … and so on. But currently they are placed according to number 1 as the first number, for example: 0-6 months, 1 year, 10 years, 11 years, 12 years, 13 years, 14 years, 15 years, 16 years, 17 years, 18 years, 2 years, 3 years …. I need this to be fixed.

    Thanks for your support!

    Marie πŸ™‚

Viewing 20 posts - 1 through 20 (of 26 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.