Membership Attributes Access

  • Author
    Posts
  • elioberga

    Hi,
    I have taskhive and membership, I disabled Marketplace since I didn’t want the buy button on the listing, I just needed to have a premium membership to content not accessible for free: I’m making a website for content uploaded just by me and accessible to paying members, while no registered people could just see everything but the attachment contents.

    Now the first question: I managed to set an attachment as an attribute of the listing (I need paying members to be able to download a pdf related to the listing) and I managed to make it downloadable just to members, if not logged in it says reveal and then asks for the plan. But in this way it hides all the attributes, not just the attachment attribute: is it possible to make just the attributes that I want restricted and make other attributes visible? for example the Level (Beginner, Intermediate, Advanced) should be visible to all; the Attachment attribute no, I can’t find this option.

    Second question: is there a way to make the attribute download attachment link more beautiful? it just shows the entire link and it’s pretty ugly.. at least personalize the text and the color (it’s blue and underlined and shows the entire path).

    Third question: is it the right way to manage the attachment? I had to disable marketplace because it didn’t let me manage it, I wanted to manage it with the digital download product of Woocommerce that let me attach more than just one attachment while Marketplace not more than one per listing, but I couldn’t manage because I couldn’t set it for free for members..

    Probably still confused, need some help and trying to understand if taskhive and memberships are the right tools 🙂

    ihordeveloper

    Hi,

    1. Please make sure that you selected the attachment attribute only for plans, only the attributes set for plans are restricted. You can edit each plan to check this (in the plan settings section).

    2. Yes, please try setting this display format for the attachment attribute:

    <a href="%value%" target="_blank">Custom Text</a>

    With HTML you can fully customize it.

    3. If you don’t want to sell access to attachments separately, then using Memberships is the right choice for this, it allows you to sell access to all listing details or attachments at once. Also, it’s possible to upload multiple attachments per listing with Marketplace, but with a simple code snippet – please let me know if you decide to use Marketplace instead and I’ll post it.

    elioberga

    Thanks mate for the quick support!
    1. perfect, it works, I need to be sure to delete the attribute from all the plans.
    2. better! can you suggest me where I can learn more ways to personalize it? would like to show the name of the file for example but not the path, personalize the color, etc.
    3. yes it would be great, I would like to test this possibility, and then make it free on woocommerce just to registered and paying members.. so i could see which is the best way!

    PS: can you suggest other sources to understand more about specific snippets (I think about personalize the listing page reducing the size of the main image or personalizing the content on the right column or personalize the result in a search from the home page – I would like to see after the search the listings not the categories).

    Thanks fot the GREAT support!

    ihordeveloper

    2. This would require further customizations, you can try using the attribute label and inline styles:

    <a href="%value%" target="_blank" style="color:red;font-weight:bold">%label%.pdf</a>

    3. Please try using this PHP snippet:

    add_filter(
    	'hivepress/v1/models/listing/attributes',
    	function( $attributes ) {
    		if ( isset( $attributes['attachments'] ) ) {
    			$attributes['attachments']['edit_field']['multiple'] = true;
    			$attributes['attachments']['edit_field']['max_files'] = 10;
    		}
     
    		return $attributes;
    	},
    	1000
    );

    You can add it via the Code Snippets plugin https://wordpress.org/plugins/code-snippets/

    There’s no common solution to the customizations you described, e.g. you can edit the Home page and add/remove blocks in the editor without any code changes, but customizing the listing page layout and image sizes requires code snippets. Please try searching existing snippets on the forum.

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

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.

Cyber Monday is here! Get 25% off with MONDAY2020 coupon code until Monday, December 7.