email link to custom page help

Home Forums Quform WordPress email link to custom page help

This topic is: not resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #28684
    aaron1988
    Participant

    Hi,

    Have a question i have load of documents which will be turned into pages.
    at the top of each document it has Dear (first name), is there a way of clicking a link in email, it then shows the correct page but generates the first_name based on the qufrom element first name id?

    Would i need to add them into custom php pages? or could i add the pages via a custom post type which i created, draft them all up as needed, and then it automatically shows the dear (name) of person who sent the form?

    As i was thinking maybe using a shortcode in backend like [first_name] and then once clicked link in email, logged in it shows the page content but its generated the first_name based on the information thye filled out in form i.e first name field.

    Thanks
    Aaron

    #28689
    aaron1988
    Participant

    Hi, just had a thought have done the first_name part as using wordpress shortcode.

    the part i am stuck on is, i have a custom post type which i will manually add them myself the bit i would like to implement is is there some sort of code that if some fills out the form it will send them to the login page which is “My Account, and then when they are logged in it shows a link to the document for that person.

    The code i have used for the custom post type is this:

    // create shortcode to list all personal performance plans.
    add_shortcode( 'ppp', 'ielts_post_listing_shortcode1' );
    function ielts_post_listing_shortcode1( $atts ) {
        ob_start();
        $query = new WP_Query( array(
            'post_type' => 'ppp',
            'posts_per_page' => -1,
            'order' => 'ASC',
            'orderby' => 'title',
        ) );
        if ( $query->have_posts() ) { ?>
            <ul class="ppp-listing">
                <?php while ( $query->have_posts() ) : $query->the_post(); ?>
                <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    <a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a>
                </li>
                <?php endwhile;
                wp_reset_postdata(); ?>
            </ul>
        <?php $myvariable = ob_get_clean();
        return $myvariable;
        }
    }

    But the problem i have is, i need it so when a certain form is sent from a customer it shows them just that form in there account. is this possible?

    #28692
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #28694
    aaron1988
    Participant

    Hi Ally,

    At the moment i am inserting the documents in the custom post type my self manually so easier to style? so could i still use this method to do what i want :).

    Thanks
    Aaron

    • This reply was modified 5 years, 1 month ago by aaron1988.
    #28695
    aaron1988
    Participant

    Or would i need to, use your create a post script(plugin) then add in that file the: ‘post_author’ => get_current_user_id() then do the: ‘author’ => get_current_user_id() in my code?

    Because at the moment basically a Yes form is submitted, and in the email there is a link this document but depending on what notification is triggered is what document will be linked.

    Thanks
    Aaron

    • This reply was modified 5 years, 1 month ago by aaron1988.
    #28699
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #28700
    aaron1988
    Participant

    Ok will see what i can come up with.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy