Remove the 'read more' boxes
-
Every post and page have a unique id in the site’s HTML, which can be found by using a browser inspector like Chromes Developer Tools.
You can use those ids to style elements in each post differently.
For example, if the CSS I posted earlier is added to the site, then the “read more” text can be changed for the “Rakeback” section by adding this:
.post-214 a.more-link:before { content:"Different Text for Rakeback"; }The .post-214 class in the CSS above means that the CSS will be confined to just the “Rakeback” post.
-
Ok, I can find the postid from the inspector by searching for postid. This is very handy for future editing.
I wonder if you can answer a similar question I had for identifying specific images and links?: https://en.forums.wordpress.com/topic/identifying-the-specific-selector-for-each-link-and-image?replies=1
E.g. With the post id I should now be able to edit all images on each page, as opposed to all images on the site, but can I edit them specificallyThis code doesn’t seem to work properly, but I am probably doing something wrong most likely;
~ I tried putting
.post-214
in front of all
a.more
in the original code you gave me as well as using.post-214 a.more-link:before { content:"Different Text for Rakeback"; }in replacement of just
a.more-link:before { content: "Your Text Here"; color: #fff; position: absolute; }When using that
.post-214 a.more-link:before { content:"Different Text for Rakeback"; }code in addition to the original code, it seems to work BUT the text is aligned right.
-
The changes you have made will prevent the CSS I posted from working correctly.
Please add the unmodified CSS I posted in my previous two comments – do not change it, except for adding text you want to use.
Then post back here if there’s an issue with it.
Thanks :)
-
Sorry my post wasn’t clear above with the messed up formatting.
I added the unmodified CSS you posted in my previous two comments and it resulted in the Different Text for Rakeback seeming like it was aligned to the right.
But I think the issue is with the original code in that the whole text is not aligning to centre. Instead the text seems to begin in the centre.
I saved and published it so you can see for yourself.
-
It is funny you are thanking me. :) Don’t think I’ve thanked you yet. But I do appreciate you and every one taking time to help.
-
You’re welcome :)
Please try adding this, it should centre it.
a.more-link:before { left: 0; right: 0; margin: auto; } -
-
-
- The topic ‘Remove the 'read more' boxes’ is closed to new replies.