Posts Module / Font size single page

Greetings,

I have a “posts” module on one of my pages. It appears that this module automatically pulls in the font size selected in customize > general > text. I’m going to call this the “automatic text size”. For various formatting reasons on all the other pages on my site, I have my automatic text size set to 12.

Is there a way to either

  1. Change the font size for a “posts” module from the automatic text size (IE: 12 in my case) to something else?

OR

  1. Is it possible to change the automatic text size for just one page?

Thanks

John

Hi John,

The answer to both of your questions is yes, it is possible with CSS. However, can you provide a link to your post/page you mention above. So we can get the correct CSS for you, please?

Thanks,
Danny

[Content Hidden]

Hey John,

For #1, we can use the CSS snippet below to change the excerpt text on the Posts module.

.fl-post-feed-content {
  font-size: 15px;
}

You can add the code above either under Appearance > Customize > Code > CSS Code, or under Tools > Layout Settings > CSS. If this is the page you only have the Posts module on, I’d suggest placing it on the latter. :slight_smile:

Ben

Awesome! Worked great. I put it on that page only.

Also. Is there any way to remove the “by” underneath the title of each post in the posts module?

IE: I have the following

TITLE
By: My Name | Date

I just want it to be

TITLE
My Name | Date

Hey John,

We can use the gettext function to achieve that. Simply add the code below to your child theme’s functions.php file.

// Remove the word By from single Posts
function my_text_with_context_translations( $translated, $text, $context, $domain ) {
  if ( 'fl-builder' == $domain ) {
    if ( 'By %s' == $text && '%s stands for author name.' == $context ) {
      $translated = '%s';
    }
  }
  return $translated;
}
add_filter( 'gettext_with_context', 'my_text_with_context_translations', 10, 4 );

Ben

Thanks Ben.

I’m a little confused though, so forgive me if these questions aren’t the greatest…

Where is my child theme? I haven’t downloaded one… I’m just using the Beaver Builder Theme.

And I’m not talking about a subscribe form module… you sure that’s the right code?

John

Hi John,

You can get your Beaver Builder child theme from your Beaver Builder My Account page. Install and activate like any other WordPress theme. Once activated, add the code provided by Ben, to your child themes functions.php file.

Ignore the mention in the code above about the Subscribe module, that is simply a comment that Ben has likely left there by accident.

Thanks,
Danny

Hey John,

Sorry about the comment! Danny is correct in that it was left there when I copied it from my local dev. I have changed the comment to reflect what it does.

Let us know how it goes!

Ben

so that works… but I have been doing all of my editing using the BB Theme as the activated theme… Now that I installed the child theme, I have to go through all of the settings on the “customize” thing and reset them.

This has me pretty scared. I’ve been editing my site for 3+ months on the BB Theme as the active theme… should I have been editing it with the child theme being active?

Hey John,

It’s really advisable to be using the child theme. If you’re switching just now, after a lot of work on your parent theme, you can export the settings from your parent theme, then import it to your child theme. Here’s how you can do it.

  1. Activate the parent theme
  2. Head over to Appearance > Export/Import
  3. Hit the Install and Activate button
  4. Go back to the same section in the customizer and export your settings
  5. Activate child theme
  6. Go back to the same section in the customizer and import the settings

This should port all your parent theme setting to your child theme.

Let us know how it goes!

Ben

No issues after the export / import.

Thanks for all the help!

No worries at all, John! Enjoy! :slight_smile:

Ben