• Resolved The Wachamacallit

    (@ineed-help)


    Hello Nimeshrmr

    What a great plugin!

    Could you please help me figure out, how can I hide all Custom Posts Types by default?

    I know I can edit one by one and hide them all, but I was wondering if you have a way to achieve that faster?

    In a a way that even when a new Custom Post is created, it would automatically be hidden from guest and shown only to signed in members, without anyone having to specified the Visibility in the Post Editor.

    I hope you can helo me out!

    Thank you!!

    https://www.ads-software.com/plugins/wp-private-content-plus/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author nimeshrmr

    (@nimeshrmr)

    Hi

    Currently we dont have features to hide all Posts by default or hide all posts using a single action. We have it planned as a features. However, its planned for Pro version only and will not be available for free version.

    You will have to customize the code and implement it with the support of a developer

    Thanks

    Thread Starter The Wachamacallit

    (@ineed-help)

    I see, ok.

    Here’s some code modifications I got, maybe it can be of your use to further your development:

    On: plugins/wp-private-content-plus/templates/post-page-restriction-meta.php

    *** Original LINE #38 ***

    ” <option value=’role’ <?php selected(‘role’,$visibility); ?> ><?php _e(‘Selected User Roles’,’wppcp’); ?></option> “

    *** BECOMES: ***

    <!--Prakash-->
    			<option value='role' selected="selected" <?php selected('role',$visibility); ?> ><?php _e('Selected User Roles','wppcp'); ?></option>
    
                <!--Open below comment if you need default feature -->
    			<?php /*?><option value='role' <?php selected('role',$visibility); ?> ><?php _e('Selected User Roles','wppcp'); ?></option><?php */?>
                <!--Prakash-->

    *** Original LINE #63 ***

    ” <input type=”checkbox” <?php echo $checked_val; ?> name=”wppcp_post_page_roles[]” value='<?php echo $role_key; ?>’><?php echo $role; ?> “

    *** BECOMES: ***

    <!--Prakash-->
                    <?php
    				if($role == 'Subscriber')
    				{ ?>
    				<input checked="checked" type="checkbox" <?php echo $checked_val; ?> name="wppcp_post_page_roles[]" value='<?php echo $role_key; ?>'><?php echo $role; ?><br/>
    		  <?php }	else
    				{ ?>
                    <input type="checkbox" <?php echo $checked_val; ?> name="wppcp_post_page_roles[]" value='<?php echo $role_key; ?>'><?php echo $role; ?><br/>
    				<?php } ?>
    
    		<!--Open below comment if you need default feature -->
    		<?php /*?><input type="checkbox" <?php echo $checked_val; ?> name="wppcp_post_page_roles[]" value='<?php echo $role_key; ?>'><?php echo $role; ?><br/><?php */?>
    
    		<!--Prakash-->

    Credit goes out to Prakash Parghi!
    https://profiles.www.ads-software.com/prakash30/

    Plugin Author nimeshrmr

    (@nimeshrmr)

    Thanks for the code and glad you got it to work. However, we have already coded this feature for the pro version and needs some improvements before we release it

    Thread Starter The Wachamacallit

    (@ineed-help)

    You’re welcome.

    Ok, thanks for letting me know.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide All Custom Posts by default’ is closed to new replies.