How to echo a plugin's function into a template?

I've tried checking for a similar question but couldn't find one. If possible please link me to this as I might be creating a duplicate. Anyways..

I am using a basic testimonial plugin (Clean Testimonials) and wish to create a custom template which it allows.

The only things I like to add are the the_client() and the_website() functions. But the the_website() function isn't displaying?

div class="su-posts su-posts-default-loop"
?php
    // Posts are found
    if ( $posts-have_posts() ) {
        while ( $posts-have_posts() ) :
            $posts-the_post();
            global $post;
            ?

            div id="su-post-?php the_ID(); ?" class="su-post"
                ?php if ( has_post_thumbnail() ) : ?
                    a class="su-post-thumbnail"?php the_post_thumbnail(); ?/a
                ?php endif; ?
                div class="su-post-content"
                    p?php the_content(); ?/p
                    p style="color:blue;"?php echo the_client (); ?, ?php echo the_website (); ?/p
                /div

            /div

            ?php
        endwhile;
    }
    // Posts not found
    else {
        echo 'h4' . __( 'Posts not found', 'shortcodes-ultimate' ) . '/h4';
    }
?

Below is the functions.php for the plugin:

?php
/*
Helper functions for Clean Testimonials
*/

function the_client () {

    global $post;

    return get_post_meta( $post-ID, 'testimonial_client_name', true );

}

function get_the_client ( $testimonial_id ) {

    return get_post_meta( $testimonial_id, 'testimonial_client_name', true );

}

function the_company () {

    global $post;

    return get_post_meta( $post-ID, 'testimonial_client_company', true );

}

function get_the_company ( $testimonial_id ) {

    return get_post_meta( $testimonial_id, 'testimonial_client_company', true );

}

function the_email () {

    global $post;

    return get_post_meta( $post-ID, 'testimonial_client_email', true );

}

function get_the_email ( $testimonial_id ) {

    return get_post_meta( $testimonial_id, 'testimonial_client_email', true );

}

function the_website () {

    global $post;

    return get_post_meta( $post-ID, 'testimonial_client_website', true );

}

function get_the_website ( $testimonial_id ) {

    return get_post_meta( $testimonial_id, 'testimonial_client_website', true );

}

function testimonial_has_permission( $testimonial_id ) {

    return get_post_meta( $testimonial_id, 'testimonial_client_permission', true ) == 'yes';

}

?

Kind regards,

Topic functions php templates plugins Wordpress

Category Web


You can use below code.

get_the_client(get_the_ID());
get_the_company(get_the_ID());
get_the_website(get_the_ID());

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.