Skip Navigation

[Resolved] Exerpt not showing on mobile phone

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 2 voices.

Last updated by Pete 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1592231
no exerpt.png

Hi there,

With help from support, created an alternating post layout using Toolset...looks great.

However 2 things, see one of these posts: hidden link

On phone, the expert isn't showing and can't work out why?

Also, I'm using this for the image:
[wpv-post-featured-image size="custom" width="700" height="740" crop='true']

See lower down, some of the feature images are smaller, this would be a pain to make them all the same size.
Is there anyway of setting this so the images are 700 x 740 regardless of their actual size?

Many thanks, Pete

#1592625

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please check the following screenshot:
=> hidden link

I can see all images displayed in the same size excluding the image at the top, it could be the featured image. Are you referencing to the featured image and all other images should be displayed as the featured image size?

I also would like to have access details to see why Exerpt text is not displayed.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1595183
cant see this.jpg

Hi Minesh,

That's really odd, I have two iPhones and neither are showing the excerpt, yet on your screen shot its showing.

What's an issue, as we are in lock down here I have no one else to ask to check for me.

To be clear, everything else is working fine, just can't see the excerpt as in my original image.

Very odd!

#1595201

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

If you can send me access details I will check why the exerpt text is not showing up.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1595237

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you have added the following function to funcitons.php file which accepts the attribute length_mobile using which you can see the mobile device length.


add_shortcode('trim', 'trim_shortcode');
function trim_shortcode($atts, $content = '') {
$content = wpv_do_shortcode($content);
 
$length = (int)$atts['length'];
$length_mobile = (int)$atts['length_mobile'];
 
if(wp_is_mobile()){
$length = $length_mobile;
}
 
if (strlen($content) > $length) {
$content = substr($content, 0, $length) . '…';
}
return $content;
}

So, within our content template you have added to your view, I've passed the length_mobile attribute value as 150 and I can see the description now.

[trim length="320" length_mobile="150" count="letter"] [types field="property-details"][/types] [/trim]

Can you please confirm.

#1595239

Hey Minesh,

You know I forgot that was there as I didn't think it worked....GREAT! Thank you.

Is there anyway I can extend the mobile length of 150 to include tablet?

Again, thank you 🙂

#1595243

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I think as per our last discussion with your previous ticket:
=> https://toolset.com/forums/topic/trim-letter-length-for-mobile-devices/#post-1584837

Where I already mentioned:
=> It seems the standard WordPress function wp_is_mobile() do not have any checks for iPad.
- https://developer.wordpress.org/reference/functions/wp_is_mobile/

So, I suggested to use the custom function I shared with my previous reply. Then we need to add the third attribute to the function like length_ipad and you need to adjust your custom function accordingly and shortcode.

#1595249

Ahhh right, this is why I didn't get this working and gave up, I kept on breaking stuff!

Ok it looks great for phone which was the issue, I wont worry about tablet, not a big issue.

Many thanks for sorting this again for me.

Stay safe 🙂

#1595251

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Great - Gload to help. please feel free to resolve this ticket 🙂

#1595255

My issue is resolved now. Thank you!

#1616199

Hi again Minesh,

Can I ask, where did you actually add this code:

[trim length="320" length_mobile="150" count="letter"] [types field="property-details"][/types] [/trim]

I'm looking in my functions.php file and can't find what you've done. Thank you 🙂