zebracrossing
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Not displaying Author’s name in one particulalr categoryP.P.S. Now Author name has vanished from all categories.
Something tricky is here.Forum: Fixing WordPress
In reply to: Not displaying Author’s name in one particulalr categoryP.S. To that code I added:
.category-blog .single-post, .entry-meta .author {
display: none;
}Looks like it works now.
Forum: Fixing WordPress
In reply to: Not displaying Author’s name in one particulalr category@threadi
Thanks a lot for the fast reply.
It worked π But there is one problem. Single posts still show author name.- This reply was modified 11 months, 1 week ago by zebracrossing.
Forum: Themes and Templates
In reply to: [Esotera] Warning at the beginning of every postOk I found it. The program was looking for an image. Bad coding, images are not mandatory. Anyway, the problem was solved when I set Featured Images to OFF.
Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?LET ME REPHRASE THE QUESTION WITH NO REGARD TO ANY SPECIFIC THEME.
I have 3 distinct categories of posts and I want the Author”entry meta” differently for each — preferably using IF and ELSEIF.Category 1 should display something like “Curated by JANE DOE”.
Category 2 should display jusy “By JANE DOE”.
Category 3 should leave “entry meta” empty.
Can someone help with the coding?I intend to go to the File Editor and directly write it into the file concerned. I will take the necessary precautions.
Some theme makers intentionally update a theme now and then, with nothing substantially new, just to discourage the users of the free edition of the theme. Most themes are not updated frequently.
Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?The biggest paradox I have come across is that I originally built the site using a theme that’s not supported since 2000, but it’s more advanced than any of the 100s of the newer themes I have seen so far. It was created with astounding foresight and structural aesthetics. It has survived all the WP and PHP versions as of the moment, and it works with WP patterns with no the least conflict. It has features unthinkable for Block Age theme builders. All the 10 categories serve a purpose in that theme. And to be frank with you, I will use that theme for my site until it’s outdated.
The current theme that I use doesn’t have that many features, but it gives me ample opportunity to use WP Patterns on the Home Page. It’s my backup solution.
‘Collection’ is an apt word for curated material. And what the site does is curating a 1000 articles that appeared in a newspaper column which started jubilantly a quarter century ago with a quiz contest session that was sponsored by Discovery Channel. It’s a national record.
For the time being I am using the code
.single .entry-meta > span.author-avatar, .single .entry-meta > span.author {
display: none;
}Thanks a lot for your time.
Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?What I said above follows my original post. We are into a project: curating/digitalizing 100s of articles authored by one person for a research-oriented column in a newspaper. So the categories are like:
Category: ARTICLES. This carries the digitalized articles ready for a website. Since all of them are written by a single person, Display of author name is not necessary. Maybe the Display could be like, “Curated by John Doe”.
Category: BACKEND. This contain SITE pages. This section contains notes from the TEAM engaged in the project. This doesn’t need a Display, or it could be just “By TEAM ZEE”.
Category: SEQUELS. Several of us are ResearchGate members, and several RG scholars are interested in the site. This category follows latest research in the topics covered in the newspaper column (Updates to Category: ARTICLES). This requires a typical byline Display, like “By Naomi Rilke”.
Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?I had located it under Inspect, howeverβ¦
I want the Display on posts under Category Blog.
I don’t want the Display on posts under other categories.Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?I meant Author Name adjacent to the Avatar.
Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?I am toying with an idea.
Let a single post check category.
if ( is_category( ‘blog’ ) ) {
echo ‘AUTHOR NAME’
} elseif ( is_category( ‘sequels’ ) ) {
echo ‘NOTHING’;
}Thanks.
Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?Oh, I am sorry. “Photo by Tadeusz Lakota on Unsplash” is in the post (part of text). We wanted to use that photo for the article assigned for that page. I will provide another example, where I don’t want the by line.
https://zebracrossing.online/7228/Forum: Fixing WordPress
In reply to: How to hide bylines in posts under selected categories?The site handles a project for curating/digitalising a 1000 newspaper articles. The curated articles are our blog posts per se, and they belong to the category ARTICLES. This needs to display the curator’s (author’s) name. An example URL:
https://zebracrossing.online/7458/The site has a section that contains updates on topics specifically covered by the articles. Updates are added by editors, under a category named SEQUELS. There could be more than one update related to an article, which means display of a single byline won’t be proper. Example:
https://zebracrossing.online/5002/We need to hide byline on posts like this (under SEQUELS.)
Forum: Fixing WordPress
In reply to: “posted by” Author name except on certain pagesDear @threadi
I just wanted you to know that the code is not related to any theme. I got it from you earlier as a generic solution that would go with any theme. This time I was only asking for a variation. I found it at last, but it was thanks to your original code. That piece is extraordinary. Thanks a lot π
Forum: Fixing WordPress
In reply to: “posted by” Author name except on certain pagesI<?php
if( ! in_array( get_the_ID(), array( 4226, 43, 44 ), true ) ) {
echo 'Digitalized by ' . get_the_author_meta('display_name');
}
?>I composed the code as above and it works now.
Forum: Fixing WordPress
In reply to: “posted by” Author name except on certain pagesActually I am using a wonderful code provided by you in another contex. Here goes:
<?php
if( ! in_array( get_the_ID(), array( 4226, 43, 44 ), true ) ) {
echo get_avatar( get_the_author_meta( 'ID' ), 40 );
echo get_the_author();
}
?>
What I want is simple. Remove the avatar, and add “Posted by” in its place. The 1st line of the code (specifying /%post_id%/) remains as it is. I hope now you can kindly help me. Thanks.- This reply was modified 1 year, 2 months ago by zebracrossing. Reason: typo