A
A
Anonimmus2021-07-13 14:11:00
WordPress
Anonimmus, 2021-07-13 14:11:00

And how to display in custom news [guid] ??

Hello. WP old update will put the site.
60ed73a6410f1541823544.png
there is a slider that is displayed from the custom section.
60ed73eb3ee2d862085010.png

in the loop I tried to display just permalink (), no value was displayed

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <?php
          $sliderQuery = new WP_Query(array(
            'post_type'      => 'imageslider',
            'posts_per_page' => -1,
            'orderby'        => 'post_date', 
            'order'          => 'ASC',
            'no_found_rows'  => 1
          ));
        ?> 
        <div class="slider-sgt">

          <div class="fotorama">
            <?php
              while ($sliderQuery->have_posts()) {
                $sliderQuery->the_post();
                $feat_image = wp_get_attachment_url(get_post_thumbnail_id());
                $link = the_guid( $sliderQuery->the_post() );
                echo '
                <img src="'.$feat_image.'" alt="" href=" ">

                '; 
         
                }
              wp_reset_query();
            ?>
          </div>

        </div>

the inspector did not issue anything, the changes are applied.
60ed753bc0bb8826359153.png
I saw the line
the_post () [guid] how to display I don’t know, tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anonimmus, 2021-07-14
@Anonimmus

Suddenly useful to someone the_post-> guid

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question