eadwig
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] How do customers access virtual products they bought?That’s answered all my questions, thank you!
Forum: Plugins
In reply to: [WooCommerce] How do customers access virtual products they bought?Thanks for the reply. Is there a way to check how the purchased virtual products appear in My Account page without making payment?
Forum: Plugins
In reply to: [PPWP - Password Protect Pages] Can you grant exclusive single-user access?I guess I’d have to stick to WooCommerce for its subscription feature and then enhance its functionality with a password-protected access restriction plugin such as yours.
I’d better ask further questions as I make progress with the personal project. I just don’t know when I can get started with it, but will keep the email address for future correspondence, thank you!
Forum: Plugins
In reply to: [PPWP - Password Protect Pages] Can you grant exclusive single-user access?Hello @ppwp
Thanks for the fast response. The plugin is looking more promising than ever!
I’d just like to allow customers to buy an access right for a specific page hosting a game while permitting single-login only for any customer, so no other customers can log in simultaneously while the customer is accessing the page enjoying the hosted game on it.
I haven’t published any website to realise this, but I’d like to allow as many customers as possible to buy access to such game-hosting pages.
Hope this clarifies.
Forum: Plugins
In reply to: [WooCommerce] Where is the Product Images settings now?Forum: Plugins
In reply to: [WooCommerce] Where is the Product Images settings now?Hello @rainfallnixfig
I already located the Product Images menu item in the customise screen. Where do you find all of these resize options which used to be under Product Image?:
Catalog Images Size, Single Product Image Size, Product Thumbnails Size
I knew you could change the product type there, too, but what’s the point of selecting product types to be listed during initial setup if change the option in the product type screen results in the same?
Sorry, the video auto-play was barred by my limited bandwidth. Ticking Auto slideshow does successfully auto-play video slides.
Forum: Plugins
In reply to: [Theme My Login] Cannot validate checkbox type form fieldThe solution including the use of !isset() conditional check worked for me:
Forum: Plugins
In reply to: [Theme My Login] Making added custom fields requiredApologies, I was too confused not to notice the function duplicates.
The code given in your Advanced Topics indeed works to validate the form controls!
Thank you.
Forum: Plugins
In reply to: [Theme My Login] Making added custom fields requiredPutting all the code as shown above into theme-my-login-custom.php still returns the following error:
Fatal error: Cannot redeclare validate_tml_registration_form_fields() (previously declared in /virtual/minnov/public_html/[domain name]/wp-content/plugins/theme-my-login-custom.php:33) in /virtual/minnov/public_html/[domain name]/wp-content/plugins/theme-my-login-custom.php on line 55
What does ‘Cannot redeclare validate_tml_registration_form_fields() ‘ indicate?
Forum: Plugins
In reply to: [Theme My Login] Making added custom fields requiredHello
I embedded the PHP code given for each Example ( https://docs.thememylogin.com/article/62-adding-extra-registration-fields.) in functions.php and theme-my-login-custom.php
Then I received the error message as below:
Fatal error: Cannot redeclare validate_tml_registration_form_fields()
For clarification, the code added in theme-my-login-custom.php is:
function add_tml_registration_form_fields() { tml_add_form_field( 'register', 'notices', array( 'type' => 'checkbox', 'label' => '当サイトからのお知らせメールを受け取る。', 'value' => tml_get_request_value( 'notices', 'post' ), 'id' => 'notices', 'priority' => 15, ) ); }And the code added in functions.php is:
function validate_tml_registration_form_fields( $errors ) { if ( empty( $_POST['notices'] ) ) { $errors->add( 'empty_notices', '<strong>ERROR</strong>' ); } return $errors; } add_filter( 'registration_errors', 'validate_tml_registration_form_fields' ); function save_tml_registration_form_fields( $user_id ) { if ( empty( $_POST['notices'] ) ) { $errors->add( 'empty_notices', '<strong>ERROR</strong>' ); } } add_action( 'user_register', 'save_tml_registration_form_fields' );For now, I just want to validate the one checkbox type field.
Please advise me what to correct.- This reply was modified 6 years, 10 months ago by eadwig.
Forum: Fixing WordPress
In reply to: the_content() returns: Warning: count() error.Putting the_content() or get_the_content() inside a loop fixes. This error has been reported as a bug: https://core.trac.ww.wp.xz.cn/ticket/42814
Forum: Developing with WordPress
In reply to: WordPress does not recognize $_GET post filtersThe post filter began working once the orderby parameter was set as variable in the argument of WP_Query() as in:
$catFilter = array( 'category_name' => $catName, 'orderby' => $orderby ); $catquery = new WP_Query($catFilter);I’m also including the code for the filter in case someone else runs into trouble (As @bcworkz suggested above, it is desirable to incorporate robustness in this.):
<form class="post-filters"> <select name="orderby"> <?php $orderby_options = array( 'post_date' => 'Order By Date', 'title' => 'Order By Title', 'rand' => 'Random Order' ); foreach($orderby_options as $value => $label): echo '<option '.selected($_GET['orderby'], $value).' value="'.$value.'">'.$label.'</option>'; endforeach; ?> </select> <input type="submit" value="Filter"> </form>Concerning the blank page, setting ‘Your Homepage Displays’ to the latest posts and replacing front-page.php with index.php has fixed the blank page issue.
Still I don’t understand why WP has to be set up this way, so I posted ‘Form started working once switched back to default reading settings but why?‘. It would be appreciated if someone could give me an answer in the new post.