Wordpress guru

I wonder if there is a wordpress or CSS guru who could help me figure out if it’s possible to make a change to one of my Wordpress sites?

We have a humble literary journal where people send us stories and we post the ones we like or think deserve a wider distribution. These are stories written by people who are not me, but the Wordpress theme we use adds my name to the post metadata. I want to suppress my name (so that the only “by” attribution is to the legitimate author), but I am not having much success getting this done.

Someone from the boards helped us customise the CSS a few years ago (Thank you jerri blank!), so we already have the ability to customize the CSS for the theme. It’s hosted on the Wordpress site. I’m so terrible at CSS/WordPress, I can’t figure it out, so I’m asking for help again.

So if you look at the top post right now in the main page index (or any index view), this is sorta what the meta would look like:

Take Heart

Posted in Junk 15: Winter 2015, Mari Casey with tags addiction, be brave sweet
normie be brave, Mari Casey, on normal men and addict fear, relationships and 
love on February 14, 2015 [B]by Tim Elhajj[/B]

by Mari Casey

by Tim Elhajj <-- This is the part that I want to go away!

Seems like it ought to be easy fix, but “seems like” and “actually fixed” are such different beasts!

Looks like it may have been hard coded into one of your theme’s template files. Check the loop.php file and search it for your name.

it actually changes with whatever account I attribute the post to. So, I have multiple users in this blog, and we all have permissions to post (I think everyone is an editor, for example). If I select a different user when I create a post, it inserts that users name where you see my name.

Yeah, so usually the theme .css files will contain the code for this. You can view them by going to your Dashboard, then Themes, then Editor. Usually there are multiple themes/subsheets to check, but typically at least one basic style.css that controls everything. Look there, first. Afterward, look for stylesheets named after things like “post” or “basic post” or whatever; they may also contain controls for this.

I think the default name for this author field (which is then replaced by the specific post-author dynamically when a new post is written by someone with post-making privileges) is bypost.author, so searching the stylesheets for that would be helpful. Then you could try code like this:

.bypost.author{ display: none; }

to try to manually suppress the tag universally.

Of course, maybe sometimes, you or another post-author on your back-end does want to show their name (e.g., you guys write an editorial or maybe a call for stories). In that case, a plugin like this might be helpful. Because different themes might handle the naming convention for the author-block in posts differently, that plugin may not work perfectly–that’s why doing it in the .css directly has the highest probability of success.

I’m going to take another stab at it later tonight. Thanks guys!

I’m hosting it on Wordpress right now, so no chance I can run any plugins beyond the ones they offer. Another good reason to do it in CSS! I just wonder if this is something that’s done with PHP?

I suspect the element-title is probably controlled by Wordpress’s PHP files, somewhere in there. Themes can, again, modify a lot of that stuff, but simpler ones will tend to call the Wordpress functions stored in wp_includes. If yours is a WP-hosted solution, you might not be able to dig into the guts, but so long as you can suss out what the actual block you want to hide is called (even right click on blank spot of a post page and click View Source, then go hunting through the code for the section title in the HTML), you can use CSS to hide it.

You could do this by editing the PHP but presumably you can’t do that hosted on Wordpress. Or can you? If you go themes can you actually change the PHP files?

As you’ve mentioned already, one workaround is to create a new wordpress user with the name of the author, and then log in as that user to Wordpress and publish the story.

Best I can do with CSS alone is this, which hides everything but the tag links in that section:

#content div.type-post.post.format-standard small {
visibility: hidden;
font-size: 0px;
}

#content div.type-post.post.format-standard small a {
visibility: visible;
line-height: 1.5em;
font-size: 11px;
padding-right: 10px;
}

Quaro!

That’s just amazing. It’s pretty much exactly what I’d hoped for. Your solution is actually a pretty good one. I lose the text that explains about tags, the date, and the category but none of that is as bad as having duplicate by lines (and my name attributed to every writer’s work!). I can experiment with adding the information we lost back in, maybe with tags somehow, or maybe just live with it out for now. This is a really good solution. Thank you so much! I am very grateful!

I don’t have access to the PHP files, which I assume would have made this much easier, but it’s worth it to me (for now) to have it hosted by WordPress, so I’m willing to make concessions. We had been doing something similar to your other suggestion – I had an account called “Editors” and we published all the posts from it. But the problem with that approach is that it made it harder to get the notifications that someone had commented or taken an action that I needed to follow up on. With the posts attributed to me, I can see all this information when I log into the dashboard.

Take a look!

Cool, happy to help.

Glad you go things sorted.
Even more glad that I clicked that link. I had not intended to spend my entire evening reading stories, but there are some really powerful and moving pieces there. I’ll be stopping by there again soon for more. So thanks, Tim!

Hey thanks for the kind words! It’s been a labor of love for my wife and I for the last few years now. I’m glad you enjoyed it. Tell your friends, especially if they’re writers, ask them to send in some work. :)