• Resolved rozindzakwan

    (@rozindzakwan)


    Hi, i need help, i already have generatedpress block premium plugin, i wanna create with code a query loop, is there any element/something, that i modify the single element on element/something, then can get with get_template_part() per post? thankyou

    • This topic was modified 10 months, 3 weeks ago by rozindzakwan.
Viewing 7 replies - 1 through 7 (of 7 total)
  • ying

    (@yingscarlett)

    Hi there,

    I’m not sure what you are trying to achieve, can you provide more info?

    Thread Starter rozindzakwan

    (@rozindzakwan)

    so i create shortcode, in the shortcode, i have query loop in there, i wanna the get_template_part(‘content’) is an element that i can change, can i achieve that?

    $args = [

                ‘post_type’ => ‘professionisti’,

                ‘posts_per_page’ => -1,

                ‘orderby’ => ‘title’,

                ‘order’ => ‘ASC’

            ];

            $query = new WP_Query($args);

    if ($query->have_posts()) {

                while ($query->have_posts()) {

                    $query->the_post();

                    get_template_part(‘content’);

                }

            }

    • This reply was modified 10 months, 3 weeks ago by rozindzakwan.
    ying

    (@yingscarlett)

    i wanna the get_template_part(‘content’) is an element that i can change

    Do you mean the GP element? You want to use a GP element as the template of your posts?

    Thread Starter rozindzakwan

    (@rozindzakwan)

    yes using that, but how to create the gp_element and the settings of gp_element and get that template using get_template_part()?

    • This reply was modified 10 months, 3 weeks ago by rozindzakwan.
    • This reply was modified 10 months, 3 weeks ago by rozindzakwan.
    ying

    (@yingscarlett)

    GP element is a GP premium feature, we can not support questions that are related to the premium plugin per WP’s regulation.

    Can you open a support topic in GP’s premium support forum? https://generate.support/

    Thanks for your understanding!

    Thread Starter rozindzakwan

    (@rozindzakwan)

    ah oke then, thankyou

    ying

    (@yingscarlett)

    No Problem 🙂 See you at the premium forum!

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

The topic ‘How to create element for looping content’ is closed to new replies.