Forum Replies Created
-
AuthorPosts
-
January 22, 2021 at 12:09 am in reply to: How to set the number of post or slide that will show in tablet and mobile view? #25821
Maria Rowena
ParticipantHello Elvin,
I tried your code but It did something wrong.
I stays with four slides even in tablet and mobile. It becomes unresponsive.
Here’s the code I use:
`add_filter( ‘wpsp_carousel_args’, function( $args , $settings ) {
if ( 1027 === (int) $settings[‘list_id’] ) {
$args[‘responsive’] = ‘responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 4,
slidesToScroll: 1,
infinite: true,
dots: true
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
// You can unslick at a given breakpoint now by adding:
// settings: “unslick”
// instead of a settings object
]’;
}
return $args;
}, 10, 2 );January 21, 2021 at 7:25 pm in reply to: How to set a default fallback image if a post doesn’t include any image? #25804Maria Rowena
ParticipantThank you so much! It works! 🙂
January 21, 2021 at 7:23 pm in reply to: Change author link to a newly created profile made by a plugin #25802Maria Rowena
ParticipantThank you so much for this. We are able to manage what we want to achieve.
Best Support Elvin! More power to you.
January 20, 2021 at 10:43 am in reply to: How to set a default fallback image if a post doesn’t include any image? #25719Maria Rowena
ParticipantThank you for the suggestion Elvin, I use that plugin before but this time it is the custom post type that does not use the default featured image field of WordPress.
Is there a way that we can set a default fall back image for the wp-show post list or carousel?
Does the code you gave to me won’t work anymore?
Looking forward for a positive response. Thank you so much! 🙂
January 20, 2021 at 12:05 am in reply to: How to set a default fallback image if a post doesn’t include any image? #25708Maria Rowena
ParticipantThank you for this code Elvin!
I tried this one but it’s not working. I use carousel slider.
See this screen shot. https://snipboard.io/v2QeZN.jpg.
And below is the code we use. 🙂
`add_filter( ‘post_thumbnail_html’, ‘tu_post_thumbnail_fallback’, 20, 5 );
function tu_post_thumbnail_fallback( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
if ( empty( $html ) ) {
echo ‘‘;
}return $html;
}January 10, 2021 at 10:31 pm in reply to: Change author link to a newly created profile made by a plugin #25243Maria Rowena
ParticipantHello Elvin,
Thank you so much! I tried your code but it brought fatal error in our website. Please see screenshot.
https://snipboard.io/rNJj4i.jpg
Also this one.
https://snipboard.io/T34L8l.jpg
Is there something wrong we did?
January 10, 2021 at 7:59 am in reply to: Change author link to a newly created profile made by a plugin #25210Maria Rowena
ParticipantAnd one last thing Elvin, please I do hope that you can share me some idea here.
Last time, I asked you regarding on how I can display author avatar set by another plugin, I got a response from the directory plugin that we are using in our website. They told us to insert this in our code.
$image_id = get_user_meta( get_the_author_meta( 'ID' ), 'pro_pic', true ); $image = $image_id ? wp_get_attachment_image_src( $image_id, 'thumbnail' ) : ''; $image_url = is_array( $image ) ? $image[0] : $image; echo "<img src='$image_url' alt='Author'>"; Can you give me an idea of where to place this code? so that it will call the profile picture set by that plugin. This is what we are using now.
add_filter( ‘wpsp_author_output’, function() {
return sprintf(
‘<span class=”wp-show-posts-byline wp-show-posts-meta”>
<span class=”wp-show-posts-author vcard” itemtype=”http://schema.org/Person” itemscope=”itemscope” itemprop=”author”>
%4$s
<span class=”author-name” itemprop=”name”>%3$s</span>
</span>
</span>’,
esc_url( get_site_url(null, ‘merchant-profile/?author_id=’.get_the_author_meta( ‘ID’ ), null ) ),
esc_attr( sprintf( __( ‘%s’, ‘wp-show-posts’ ), get_the_author() ) ),
esc_html( get_the_author() ),
get_avatar( get_the_author_meta( ‘ID’ ) )
);
});I will really be thankful if you can guide me somehow. Thank you so much.
-
This reply was modified 1 month, 3 weeks ago by
Maria Rowena.
January 10, 2021 at 7:48 am in reply to: Change author link to a newly created profile made by a plugin #25208Maria Rowena
ParticipantHello, I tried the CSS but it’s still not working. It destroys our design. What I did now as a workaround is I edited the ‘View all posts by %s’ in the code and leave only ‘%s’ so that It will show the author name whenever you hover in the avatar. Here is our website –> https://clopirent.ph/
January 4, 2021 at 5:48 am in reply to: Change author link to a newly created profile made by a plugin #24911Maria Rowena
ParticipantIt’s alright Elvin, I understand. Asian, specifically, Filipinos are really great in their work! They deserve that long holiday!
By the way, I tried your code and the CSS style you provided. I’m afraid to say that it’s not working. Whenever I hover to the avatar I can only see this “View all post by..”
Please see this screen shot–> https://snipboard.io/OImyD4.jpg
What could be the reason behind this?
Thank you so much for your help.
December 30, 2020 at 6:57 am in reply to: Change author link to a newly created profile made by a plugin #24766Maria Rowena
ParticipantHello Elvin,
I just want to have a sort of tooltip? Like this one in this screen shot–> https://snipboard.io/eXJIcR.jpg
Whenever you hover your mouse in the avatar there is a tooltip that has the full name of the that user in avatar. Can you help me with that one?
Regarding the avatar image, it’s alright. I am already satisfied to what you are doing now.
Hope to hear from you. Thanks.
December 29, 2020 at 8:46 am in reply to: Change author link to a newly created profile made by a plugin #24740Maria Rowena
ParticipantAlso, Elvin, I failed to tell you that the snippet I use above is not actually pulling the profile picture created by the plugin.
Originally, I plan to upload the profile pictures manually. I thought of transferring it from the plugin user profile pictures to the admin backend user profile picture. Now, I think that is a tedious task.
Do you think there is a way that the code above can pull the profile picture set by that plugin? If none, it’s fine but I do hope that there is a way so that it will save me time. 🙂
Take a look at the screen shot of wpsp carousel–> https://snipboard.io/Py6aQ1.jpg
This is the screen shot of the grid created by the plugin–> https://snipboard.io/PfVwXm.jpg
And I saw this one from this link. Take a look at this screen shot–>https://snipboard.io/UThgid.jpg
Here is our website under development–> https://clopirent.ph/
If this is impossible, it’s fine. I am so much satisfied with all your help. 🙂 Thank you so much Elvin!
December 29, 2020 at 7:52 am in reply to: Change author link to a newly created profile made by a plugin #24736Maria Rowena
ParticipantHello Elvin,
Thank you so much for the Code! It works! It is exactly what I want.
I use this
add_filter( 'wpsp_author_output', function() { return sprintf( '<span class="wp-show-posts-byline wp-show-posts-meta"> <span class="wp-show-posts-author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author"> <a class="url fn n" href="%1$s" title="%2$s" rel="author" itemprop="url"> %4$s </a> </span> </span>', esc_url( get_site_url(null, 'merchant-profile/?author_id='.get_the_author_meta( 'ID' ), null ) ), esc_attr( sprintf( __( 'View all posts by %s', 'wp-show-posts' ), get_the_author() ) ), esc_html( get_the_author() ), get_avatar( get_the_author_meta( 'ID' ) ) ); });
One last thing Elvin, can you help show the full name of the author whenever they hover on the profile picture. It think, we need to modify this part of the code–> ‘View all posts by %s’
I want to show the full name of the author. Thank you so much in advance.
You are really the best!
Maria Rowena
ParticipantThank you so much Tom, I found a way to do it! I just made a little mistake in the code that I posted above. You are the best! 🙂 I am really happy using this plugin. 🙂
Maria Rowena
ParticipantI’m sorry, is there a way we can implement this in WPSP–>https://wordpress.stackexchange.com/questions/71368/how-to-pull-user-author-profile-data-in-a-plugin
-
This reply was modified 9 months, 3 weeks ago by
Maria Rowena.
Maria Rowena
ParticipantI tried this <?php var_dump(um_profile_id()); ?>
and yes, I see the ID of current user. I’m so sad.
I think, this is not under the scope of your support anymore but perhaps you know a way on how to get user/author i’d when viewing their profile?
Thank you so much. 🙂
-
This reply was modified 1 month, 3 weeks ago by
-
AuthorPosts