- This topic has 9 replies, 4 voices, and was last updated 4 years, 2 months ago by Tom.
-
AuthorPosts
-
January 23, 2020 at 12:00 pm #1141856David
Hello!
Issue 1: We have a “scientifically reviewed by xxx” added here: https://socialpronow.com/blog/how-to-bond/
It was added as through a hook. (after_entry_title)
However, we also want it to show up under the author name for the same articles in archives: https://socialpronow.com/blog/
Issue 2: If you make a mobile preview of the scientifically reviewed text, you see that it’s smaller than the author text above it: https://socialpronow.com/blog/how-to-bond/
When looking at the author text in chrome inspector it says font-size 85%, so that’s what I set the scientifically reviewed to, but it still behaves differently. How can we make it the same?
Issue 3: How do I change the link color on author to match the one of scientifically reviewed by?
January 23, 2020 at 2:45 pm #1141988LeoStaffCustomer SupportHi there,
1. Did you include Blog and All Archives under the display rules of the element?
2. On mobile it actually inherits the body text setting so try this:
@media (max-width: 768px) { .factchecked { font-size: inherit; } }
3. Try Customizer > Colors > Content > Entry meta Links Hover.
Let me know if this helps ๐
January 24, 2020 at 7:25 am #1142700DavidHello, 2,3 solved – thank you!
For 1, when adding blog + all archives to the display rule, the “scientifically reviewed by” shows on all blog posts on archive. We only want them to show for those posts that have actually been reviewed. Ie, the blog posts that have been tagged with “reviewed by”.
January 24, 2020 at 7:39 am #1142711DavidStaffCustomer SupportHi there,
For your All Archives and Blog Hook you can add a condition around your HTML like so:
<?php if ( has_tag( 'tag_slug' ) ) { ?> // Display your HTML <?php } ?>
just change the
tag_slug
to match the requirement.January 24, 2020 at 10:59 am #1142935DavidHi, David
I tried adding the following as a hook and set display rules to blog and all archives.
<?php if ( has_tag( 'fact-checked-by-viktor-sander-b-sc-b-a' ) ) { ?> <p class="factchecked">Scientifically reviewed by <a href="https://socialpronow.com/about-viktor-sander/">Viktor Sander B.Sc., B.A.</a></p> <?php } ?>
However, it still shows the hook for articles without that tag.
January 24, 2020 at 5:00 pm #1143144TomLead DeveloperLead DeveloperCan you link us to a post with that tag?
Let me know ๐
January 27, 2020 at 8:47 am #1145875DavidHello! This one for example: https://socialpronow.com/blog/how-to-bond/
January 27, 2020 at 8:52 am #1145889DavidStaffCustomer SupportThat post has a tag of:
reviewed-by-viktor-sander-b-sc-b-a
January 27, 2020 at 3:35 pm #1146249DavidI’m sorry about that. I’ve corrected it, but the problem persists.
Attempt 1: Combining in one hook: https://paste.pics/f3bb92721dbe8c1f6f6cbc8aa9c6e556
Attempt 2: Separate hook: https://paste.pics/0e085a346e056d34e53b439b982c7889Both make the “reviewed by” show up on all blog entries in the archive and /blog
January 27, 2020 at 7:31 pm #1146373TomLead DeveloperLead DeveloperYou shouldn’t need any of the PHP inside the hook if you’re using the Display Rules to target the tag. Can you try without?
-
AuthorPosts
- You must be logged in to reply to this topic.