Links do not have a discernible name
Missing aria-labels on the thumbnails of post links.
How to add aria-labels on the post block images to prevent that?
Thanks in advance and have a nice day
We’re presently attempting to create a loop of file downloads from another plugin (Download Manager) that generates its own custom post type (dlm_download). We have a bit of a mix between custom Bootstrap-based .PHP template files and Page Builder to allow for some freedom of layout, but also heavy customization.
While we’d usually run a PHP-based query in one of the templates, the particular layout of this page requires doing so via Page Builder; hence the use of the Post Loop widget. Unfortunately the CPT created by the download plugin is not showing up in the Post Type options.
We’re all set up to add an action to change the $args on this post type in order to force it to show up (as below):
add_action('register_post_type_args', function ($args, $postType) {
if ($postType !== 'dlm_download'){
return $args;
}
$args['ExampleArgument'] = ArgumentSetting;
return $args;
}, 99, 2);
…but instead of cycling through every possible option, we thought it would be easier to ask what arguments are necessary to get this CPT to pop up in the Post Loop > Post Type options.
P.S.: We tried public => true, but encountered a server loop (possibly because we’re trying to run it as an mu-plugin; haven’t checked yet).
Thank you!
]]>I decided to give up on elementor and I’m having some difficulties with converting the site. One of them is that the blog page looks awful, with lots of blank spaces in between. I used the loop of posts. Im’ working on a draft, so I don’t have a link to the page, but I made a screenshot in https://imgur.com/a/eUs06Ov.
The page should look something like this: https://mariopedrosa120.org.br/reflexoes/
Can you help me? Or at least point what I should do or are doing wrong?
Thanks a lot and best regards!
]]>Can someone please point me in the right direction regarding the location of the template file that contains the blogs posts loop I’m using the blog element.
Any help would be greatly appreciated.
Kind redards
]]>I am using the Followers Extension and allow members to create New Post (Post Type).
I would like to set up a page where Logged In Members can see a List (post loop) of Posts only from Members they follow.
I am not sure how to get a list of Members a user follows into a loop of posts.
thank you for your assistance
Rob
]]>I am using the following PHP loop:
<?php
if(have_posts()):
global $wp_query;
$args = array_merge( $wp_query->query, array( 'post_type' => 'any' ) );
query_posts( $args );
while(have_posts()) : the_post();
get_template_part('content', get_post_format());
endwhile;
else :
echo '
No Content Found
';
endif;
wp_reset_postdata();
?>
But it isn’t using the order set on the back end… Is there an “orderby” value I need to add to my loop?
Thanks,
]]>get_the_category
/ Block direct requests
if ( !defined('ABSPATH') )
die('-1');
echo $before_widget;
if ( !empty($title) )
echo $before_title . $title . $after_title;
if( $flexible_posts->have_posts() ):
?>
<ul class="featured-posts row list-inline">
<?php while( $flexible_posts->have_posts() ) : $flexible_posts->the_post(); global $post; ?>
<li id="post-<?php the_ID(); ?>" <?php post_class('col-md-4'); ?>>
<a href="<?php echo the_permalink(); ?>">
<?php
if( $thumbnail == true ) {
// If the post has a feature image, show it
if( has_post_thumbnail() ) {
the_post_thumbnail( $thumbsize );
// Else if the post has a mime type that starts with "image/" then show the image directly.
} elseif( 'image/' == substr( $post->post_mime_type, 0, 6 ) ) {
echo wp_get_attachment_image( $post->ID, $thumbsize );
}
}
?>
<div class="title-block"><h4 class="title-for-widget"><?php the_title(); ?></h4></div>
</a>
</li>
<?php endwhile; ?>
</ul><!-- .dpe-flexible-posts -->
<?php else: // We have no posts ?>
<div class="dpe-flexible-posts no-posts">
<p><?php _e( 'No post found', 'flexible-posts-widget' ); ?></p>
</div>
<?php
endif; // End have_posts()
echo $after_widget;
Thank you in advance
]]>