Support » Plugin: WooCommerce » Custom page template not displaying shortcode

  • Resolved SRD75

    (@srd75)


    Hi,

    I’d like to create a custom page (in terms of URL and page text) for resetting the WordPress User/WooCommerce Customer password.

    I’ve created the following page template called password.php:

    /*
    Template Name: Password
    */
    
    <?php get_header(); ?>
      <section id="main">
        <article>
    	  <h1><?php the_title(); ?></h1>
          <?php while ( have_posts() ) : the_post(); ?>
          <?php the_content(); ?>
          <?php endwhile; ?>
    	  <?php do_shortcode('[woocommerce_lost_password]'); ?>
        </article>
      </section
    <?php get_footer(); ?>

    I’ve created a new WordPress page, added the content:

    If you need to set your password for the first time, or reset a lost password, please enter your email address below.

    and set the page template to “Password”.

    The page slug is ‘password’ also.

    In WP Admin > WooCommerce > Settings > Account, I’ve set the “Lost Password” endpoint to ‘password’. (First time I’ve edited a WooCommerce endpoint.)

    After saving the page, I load http://www.example.com/password, and it displays the home page content, while maintaining the ;password’ page slug!

    The page id of the ‘password’ page is 803.

    The page id of the home page is 147.

    When I edit the ‘password’ page, I am @ /wp-admin/post.php?post=803&action=edit

    I don’t understand what is happening here.

    Troubleshooting tips appreciated.

    https://wordpress.org/plugins/woocommerce/

    Affected page is https://www.wascc.com.au/password/

    ### WordPress Environment ###
    
    Home URL: https://www.wascc.com.au
    Site URL: https://www.wascc.com.au
    WC Version: 2.5.5
    Log Directory Writable: ✔
    WP Version: 4.4.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_bwlimited/1.4 mod_perl/2.0.6 Perl/v5.10.1
    PHP Version: 5.4.27
    PHP Post Max Size: 8 MB
    PHP Time Limit: 0
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.5.47
    Max Upload Size: 2 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✕ Your server does not support the mbstring functions - this is required for better character encoding. Some fallbacks will be used instead for it.
    Remote Post: ✔
    Remote Get: ✔
    WCS_DEBUG: ✔ 
    
    							 No
    Subscriptions Mode: ✔ 
    
    							 Live
    
    ### Database ###
    
    WC Database Version: 2.5.5
    :
    woocommerce_sessions: ✔
    woocommerce_api_keys: ✔
    woocommerce_attribute_taxonomies: ✔
    woocommerce_termmeta: ✔
    woocommerce_downloadable_product_permissions: ✔
    woocommerce_order_items: ✔
    woocommerce_order_itemmeta: ✔
    woocommerce_tax_rates: ✔
    woocommerce_tax_rate_locations: ✔
    
    ### Active Plugins (23) ###
    
    Akismet: by Automattic – 3.1.10
    BackUpWordPress: by Human Made Limited – 3.6.0
    Broken Link Checker: by Janis Elsts
    Vladimir Prelovac – 1.11.2
    
    WordPress CountDown Pro - WebSites/Products Launch: by Lambert Group – 1.2.3
    CIO Custom Fields Importer Pro: by VisualData – 1.1.1
    Duplicate Menu: by Jonathan Christopher – 0.2
    Event Tickets Plus: by Modern Tribe
    Inc. – 4.1.1
    
    Event Tickets: by Modern Tribe
    Inc. – 4.1.1
    
    Google Analytics by Yoast: by Team Yoast – 5.4.6
    MailChimp for WordPress: by ibericode – 3.1.5
    Pods - Custom Content Types and Fields: by Pods Framework Team – 2.6.1
    Recent Posts Widget With Thumbnails: by Martin Stehle – 4.9.1
    Slider Revolution: by ThemePunch – 5.2.4
    What The File: by Never5 – 1.5.2
    WooCommerce eWAY Payment Gateway: by WooThemes – 3.1.9
    WooCommerce Subscriptions: by Prospress Inc. – 2.0.11 – 2.0.12 is available
    WooCommerce: by WooThemes – 2.5.5
    WooThemes Helper: by WooThemes – 1.6.1
    Wordfence Security: by Wordfence – 6.0.25
    Yoast SEO: by Team Yoast – 3.1.2
    WP All Export Pro: by Soflyy – 1.2.3
    WP All Import Pro: by Soflyy – 4.2.9
    WP All Import - WooCommerce Add-On Pro: by Soflyy – 2.2.8
    
    ### Settings ###
    
    Force SSL: –
    Currency: AUD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ✔
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #168 - /shop/
    Cart: #169 - /cart/
    Checkout: #170 - /checkout/
    My Account: #171 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    subscription (subscription)
    variable (variable)
    variable subscription (variable-subscription)
    
    ### Theme ###
    
    Name:
    Version: 1.0
    Author URL:
    Child Theme: ✕ – If you're modifying WooCommerce on a parent theme you didn't build personally
    then we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    In WP Admin > WooCommerce > Settings > Account, I’ve set the “Lost Password” endpoint to ‘password’. (First time I’ve edited a WooCommerce endpoint.)

    This is the issue. The ‘endpoint’ is our dynamically created endpoint for password resets. Your new page won’t take priority over this one.

    Got it. I understand now. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom page template not displaying shortcode’ is closed to new replies.