• navyspitfire

    (@navyspitfire)


    I am trying to edit the pmpro_account.php file which is located inside /paid-memberships-pro/shortcodes/. I tried creating a /mytheme/paid-memberships-pro/shortcodes/’ folder and copying the file into it and editing it, but it’s not working. Is there another way to edit that template file? Specifically I am trying to remove the username field from the membership account > my account section.

    https://wordpress.org/plugins/paid-memberships-pro/

Viewing 4 replies - 1 through 4 (of 4 total)
  • wealthy

    (@wealthy)

    If you are going to edit any files, you should put these in your child theme. that way these will be used rather than the original files.

    and when the plugin is updated, they wont get over written.

    so put the file in the same folder (structure) within your child theme.
    So in this case create a folder /paid-memberships-pro/shortcodes/ in the child theme and put a copy of that file in there and then modify that file.

    A child theme is a theme that inherits the functionality of another theme, called the parent theme. Child themes allow you to modify, or add to the functionality of that parent theme. A child theme is the best, safest, and easiest way to modify an existing theme, whether you want to make a few tiny changes or extensive changes. Instead of modifying the theme files directly, you can create a child theme and override within.

    Thread Starter navyspitfire

    (@navyspitfire)

    Thanks. I guess I was unclear because that’s exactly what I did and it didn’t work.

    sjolshagen

    (@sjolshagen)

    Hi,

    Unfortunately, the accounts page is a little different from the other membership pages and as a result can’t be modified the same way (I’ll talk w/Jason so we can do a better job of highlighting that).

    The [pmpro_account] short code takes arguments, just like most other short codes (except our other membership page shortcodes, just to confuse things).

    The supported argumen is the sections="" argument which accepts a comma separated list of sections to display within that instance of the shortcode. The sections we have split the output into are: membership,profile,invoices,links.

    As a result, you can create a page with your information, then include (only) the ‘membership’ info by adding the following shortcode (example):

    [pmpro_account sections="membership"]

    This approach allows you to have multiple different account pages, or multiple sections in different orders, plus multiple instances of the [pmpro_account] short code on a single WordPress page. Any of those options should be valid accounts pages and assignable to the “Accounts” page setting in the PMPro Settings.

    Hope this helps?

    Thread Starter navyspitfire

    (@navyspitfire)

    Yes I understand that, but I am trying to simply remove the username
    <li> in the profile section. I found it in the template, but apparently I can’t modify it in my child theme, and I am trying to find ways to remove it in the template file rather than simply hiding it with CSS.

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

The topic ‘Editing a file in the /shortcodes/ folder’ is closed to new replies.