- This topic has 20 replies, 2 voices, and was last updated 3 years, 7 months ago by Tom.
-
AuthorPosts
-
August 21, 2020 at 11:38 am #1413096Andres
Hi,
I hope you guys are well.
I was hoping you could help me: 1. Remove the author from all posts, 2. Display the “Update on” date, and 3. Remove the links for “Published on” and “Updated on”, please.
Removing Author
I found the CSS below in a GP support ticket. It removes the author name, but it leaves “by”.
.wpsp-load-more {
text-align: center;
}Is it possible to remove the “Author” via PHP instead of CSS?
Basically, what I am looking to do, is have it look like this, using PHP if possible, please.
Updated: Day Month year Published: Day Month year
Updated: 10 June 2020 Published: 5 April 2019
Thank you, and have a good day!
Andrés
Could you guys please help with displaying “Updated On” date and remove the “author” on all posts using PHP?
Have a good day and great weekend!
Andrés
August 21, 2020 at 3:22 pm #1413275TomLead DeveloperLead DeveloperHi there,
Have you tried disabling the author in Customize > Layout > Blog?
As for displaying the updated and published date, this should help: https://docs.generatepress.com/article/show-the-updated-post-date/
Let me know 🙂
August 21, 2020 at 4:36 pm #1413308AndresHi Tom,
Happy Friday!
Sorry, I failed to mention I’m using custom php templates for category pages + WPSP for the posts lists, the blog module.
Thank you, and have a good weekend.
Andrés
August 22, 2020 at 9:32 am #1414001TomLead DeveloperLead DeveloperIf you go into the list settings and go to the “Meta” tab, you can disable the author there.
For the date, try this: https://wpshowposts.com/support/topic/updated-date-meta-from-generatepress/#post-3920
Let me know 🙂
August 22, 2020 at 12:05 pm #1414145AndresHello Tom,
Before contacting you guys about removing the author form posts, I did make sure it was disabled in WPSP. In fact, none of the meta options are enable for any posts list in WPSP.
I’ll check out the page you sent regarding the date.
I have a question about image alt text. Most, if not all, of our images have text in the “Alternative Text” field for images in the Media Library. However, when inspecting these image elements, it shows there is no alt text.
Some images on the site have text in the Alt Text field that appears when an image block is active in the block editor. When inspected, these image elements do show there is alt text.
Is there something in the theme that needs to be configured so alt text input in the Alternative Text field for images in the Media Library is visible to search engines?
Thank you, Tom. Have a good day.
Andrés
August 22, 2020 at 12:41 pm #1414181TomLead DeveloperLead DeveloperThe theme itself doesn’t apply there, as you’re using WP Show Posts.
I’d need to see the images to know for sure – any chance you can post in the WPSP forums?
Thanks!
August 22, 2020 at 12:52 pm #1414186AndresHi Tom,
In your comment, “If you go into the list settings and go to the “Meta” tab, you can disable the author there”, are you referring to GP or WPSP? If WPSP, that’s where I made sure “Author” metadata was disabled on all posts lists. Regardless, it’s still showing the author on all posts.
I’ll start a post in WPSP so you can inspect the images that whose alternative text is not appearing when the page is inspected. I think that’s what you want me to do.
Cheers!
Andrés
August 23, 2020 at 9:36 am #1415063TomLead DeveloperLead DeveloperYes, the Meta tab is for WPSP.
I suppose it depends on what’s displaying your posts – WPSP or GP. Do you have a link?
August 23, 2020 at 10:07 am #1415085AndresHello Tom,
WPSP is displaying the post lists, i.e., the lists of posts on a category page. No meta data is appearing on the category page where there is a WPSP posts list.
The metadata I am referring to – the published date, the updated date, and author – appear on individual posts. Therefore, it looks like this metadata is generated by GP.
This is a link for a post: *
Please delete once you no longer need it.
As for the image alt next not appearing in the HTML even though there is text in the Alt Text field for images in the Media Library, would you like me to start another support ticket in GeneratePress or in WPSP? I don’t think it’s an issue with WPSP given that the issue is affecting images site wide, not just with ones in posts lists generated by WPSP.
Thank you Tom, and have a god day.
Andrés
August 23, 2020 at 12:48 pm #1415206TomLead DeveloperLead DeveloperHave you disabled that metadata in Customize > Layout > Blog? There are options for Archives and Single Posts: https://docs.generatepress.com/article/blog-overview/
I’m seeing an
alt
attribute on the main image on the page you linked to at the moment.August 23, 2020 at 1:53 pm #1415263AndresHi Tom,
I’m not using the Blog Module, so those options are not available. I’m using custom php templates for all category pages, and WPSP to generate posts lists. All the metadata option in WPSP are disabled.
The issue with alt text not appearing in the HTML is affecting most images. All images have text in the alt text field in the Media Library. Very few images have text in alt text field in the image block in the block editor. Only those image with text in the alt tex field in the image block in the block editor have it appear in the HTML. If an image does not have any text in the alt text field in an image block in the block editor, not alt text appears in the HTML when inspecting the page, even if there is text in the alt text field for those images in Media Library.
Here are screenshot that demonstrate the issue.
* The first 3 show an image with text in the Alt Text field in Media Library, but not in the Alt Text field in the image block in the block editor, but not alt attribute in HTML.
1. Alt Text in Media Library: https://prnt.sc/u4lkyp
2. No Alt Text in Image Block In Block Editor: https://prnt.sc/u4lm59
3. No Alt Attribute in HTML: https://prnt.sc/u4lmgy
* The last 3 show an image with text in the Alt Text field in Media Library and text in the Alt Text field in the image block in the block editor, and with alt attribute in HTML.
1. Alt Text in Media Library: https://prnt.sc/u4lnfe
2. Alt Text in Image Block In Block Editor: https://prnt.sc/u4lnr8
3. Alt Attribute in HTML: https://prnt.sc/u4lo25
Were this just a couple hundred images, this would not be a big deal. However, we’re talking about 2,000 + images that I’ve written alt text for in the Media Library. This took many, many hours to do. It’s no wonder our ranking have dropped considerably. 99.9% of our images are showing as having to alt text, when they actually do. Images are what we do, and lots of clients find us via image searches.
Please, please say there is a way to easily make the current alt text appear in the HTML.
Thanks, Tom.
Have a good evening.
Andrés
August 24, 2020 at 9:12 am #1416370AndresHello,
Just checking to see if you guys know of a way to resolve the issue regarding the alt text that’s input in the Alternative Text fields in the Media Library not appearing in the HTML (if there is not text in the alt text field in the image block) that does not require replacing each image.
Here’s how I input the images and alt text:
1. Create GenerateBlocks container
2. Input image block in container.
3. Upload image file from computer to image block in #2
4. Repeat until all images for page/post uploaded
5. Repeat for all pages and posts.
6. Go to Media Library and input alt text for all images on that post.
This is the most efficient way to do this.I’m pretty sure this is a fairly common way to insert images and write image alt text. When researching best practices for writing alt text, writing it in the Alternative Text field in the Media Library was the way to do it.
On another note, if I update the alt text for an image file in the Media Library, it does not update in the HTML or in the alt text field in for that image block. On the other hand, if I update the alt text connected to an image block, it does update in the HTML but it does not update the alt text field for that image in the Media Library.
This means: 1. In order to update alt text and have the updated alt text appear in the HTML, if have to re-upload each image after updating the alt text in the Media Library, and 2. The updated alt text for an image block appears to be tied to the image block, not the actual image file.
It seems there is a disconnect between the image block and the actual image file with regards to alt text. To have to re-upload every image that has had its alt text in the Media Library modified doesn’t sound right and is a great waste of time and resources.
Please let me know if there is a way to resolve this issue that does not require me to re-upload thousands of photos.
Have a good day.
Andrés
August 24, 2020 at 10:14 am #1416472TomLead DeveloperLead DeveloperI’m not using the Blog Module, so those options are not available. I’m using custom php templates for all category pages, and WPSP to generate posts lists. All the metadata option in WPSP are disabled.
I thought we were talking about single posts? You may want to enable the Blog module to check.
As for your alt tags, your images in the content aren’t dynamic. You can’t change the alt text in the Media Library and have all of them update automatically, unfortunately.
When you insert an image (or any non-dynamic text) to a page, it is saved in the database and must be updated in order to reflect the changes.
So, you need to:
1. Add the alt text as you insert the images.
2. Update/change the alt text inside the editor that has the image, then apply the change in the editor itself.That will make sure the proper HTML is saved to your pages.
August 24, 2020 at 10:34 am #1416504AndresHello Tom,
Yes, we are talking about the author and date attributes on single posts.
I’ll start over. I want to remove the author attribute on all single posts. I want to add “Updated On” on all single posts. I want to remove the links for all date and author attributes on single posts.
All posts lists on all category pages are built using a custom category php template + WPSP for the posts lists. I am not using the Blog Module for 2 reasons: 1. Not all category pages have the same posts-lists styling, and 2: It breaks category pages.
If I enable the Blog Module, it breaks the category pages. Each category page uses a custom category php template for the posts lists using WPSP.
When you helped me some time ago with creating the category php templates, it came up that when the Blog Module was enabled, it broke the category pages on the front end. I did not pursue the issue given that I did not need the Blog Module.
Should it be possible to have the Blog Module enabled and use custom category php templates?
As for the alt text, to say that it really sucks would be an exponential understatement. If that’s the case, then I don’t know why it’s not mentioned in any article that covers adding image alt text, or in articles that cover doing an SEO makeover involving redoing alt text. So, if someone wants to do an SEO update involving redoing alt text, this means they would have to re-upload all the images? That’s the opposite of efficient and user-friendly.
Thanks, Tom.
Have a good day.
Andrés
August 24, 2020 at 3:02 pm #1416755TomLead DeveloperLead DeveloperIf I enable the Blog Module, it breaks the category pages. Each category page uses a custom category php template for the posts lists using WPSP.
How so? The Blog module shouldn’t have any effect on your custom page templates. It allows you to disable those meta items on single posts, so it would definitely be helpful.
When it comes to the alt text, it’s definitely not ideal, but it’s how WordPress (and everything else?) works. Once content is added to the page, it’s saved as-is to the database, so it will only change/update if you change/update it.
The only way around it would be to create some sort of dynamic image shortcode/block, but I’m not sure where to even start there, unfortunately.
-
AuthorPosts
- You must be logged in to reply to this topic.