• Resolved loxx927

    (@loxx927)


    Hi, I have been trying to do what I think is a pretty simple task, but so far, have not been successful.

    I am attempting to create a 2 col portal style page, where the user is presented with a list of choices on the left and the content area on the right is updated when the user clicks a link.

    So far, my attempts to either add the shortcode <?php do shortcode(‘[order_history’]); ?> or try to include the order history page (include(/plugins/easy-digital-downloads/templates/order-history.php) just end up in a 500 server error on my site.

    Is it not possible to include (or shortcode) various pages of EDD into another page? I would certainly think so, so obviously I must not be using the right approach.

    Would appreciate any suggestions.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @loxx927

    Thanks for your detailed response. Yes, you can add plugin shortcode to any page you want. There will be no issue in that.

    The correct shortcode is [purchase_history]

    In case if you are getting 500 error, It means there is some functionality is breaking. You should check your error log. The error should be there which helps us to identify the issue.

    Thread Starter loxx927

    (@loxx927)

    Thank you for the suggestion. I have looked at my server error logs, but no errors are being logged, so whatever is causing the issue is happening before it writes something to the log I’m guessing.

    Just to help clarify a bit further, I am trying to include the page at the template level,

    so for example, in the single.php template (just an example), I want to include the page in the content loop:

    <div class=”history-info”>
    <php include(/plugins/easy-digital-downloads/templates/order-history.php); ?>
    </div>

    doesn’t work (produces 500 error)

    nor does this
    <div class=”history-info”>
    <php do_shortcode([‘purchase_history’]); ?>
    </div>

    Also produces 500 error. So I’m stumped as to why.

    Hi @loxx927

    Thanks for your code. I am not sure it is a typo mistake or something but you forgot to open the PHP tag properly. It should be <?php not <php

    Please try this.

    <div class="history-info">
    <?php echo do_shortcode(['purchase_history']); ?>
    </div>
    Thread Starter loxx927

    (@loxx927)

    Sorry, that was just a typo I made here. I have it properly formatted (?php) in my code and it doesn’t work.

    Just gives me the aforementioned 500 error… so I’m stumped as to why I can’t pull the page into another page.

    Any other thoughts?
    Thanks!

    • This reply was modified 3 years, 3 months ago by loxx927.

    Hi @loxx927

    Hmmm… Very Strange.

    Please try the below steps.
    1) Create any test page.
    2) In page editor put the plugin shortcode in it [purchase_history]
    3) Publish the page and see it is working or not.

    Let’s see this gives error or not.

    Thread Starter loxx927

    (@loxx927)

    Hi,

    I tried your test step and this works. So that’s good. However the page I’m creating, I need to include the page in php, since my attempts to include the shortcode in the page just give a 500 error.

    I am using a plugin called php everywhere to be able to add include statements to my page.

    The following code works great:
    <div id=”submit-ticket”>
    <?php include( ‘wp-content/plugins/awesome-support/themes/default/submission.php’ ); ?>
    </div>

    But the following code does not work: (500 error)
    <div id=”support-ticket-display”>
    <?php if is_user_logged() {
    include( ‘wp-content/plugins/awesome-support/themes/default/list.php’ );
    } ?>
    </div>

    So there must be some sort of conflict on the list.php page with the main template page that doesn’t like to be included in this method. Not sure what it might be though.

    Thanks for the assistance!

    Plugin Support Mihai Joldis

    (@misulicus)

    @loxx927
    Hi there,

    In your code you need to add () in the IF statemenet.
    <?php if is_user_logged() {
    should be
    <?php if( is_user_logged() ) {

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Include EDD pages into another page’ is closed to new replies.