Extend BB Pricing Tables

#1

Hi,

i am trying to extend the “default” pricing table. I have created a couple of directories in the theme; theme -> fl-builder -> modules -> pricing-table.

In pricing-table.php I want to add a byline underneath the Title, so I added the following on line 153;

'byline' => array( 'byline' => __( 'Byline', 'fl-builder' ), 'fields' => array( 'byline' => array( 'type' => 'text', 'label' => __('Byline', 'fl-builder'), ), 'byline_size' => array( 'type' => 'text', 'label' => __('Byline Size', 'fl-builder'), 'default' => '14', 'maxlength' => '3', 'size' => '4', 'description' => 'px' ), ),

This works as expected and i can add text for the byline. My problems start when i want to include the byline in the Color selection, so the background-color is selected together with the title.

In front-end.css.php i added to line 40;

<?php elseif ($settings->highlight == ‘title’) : ?>

.fl-builder-content .fl-node-<?php echo $id; ?> .fl-pricing-table-column-<?php echo $i; ?> .fl-pricing-table-title,
.fl-pricing-table-byline{
background: #<?php echo $pricing_column->column_background; ?>;
color: #<?php echo $pricing_column->column_color; ?>;
}

Since i am a php noob, i suspect that my logic is wrong. My thoughts are that somewhere in this: ?php elseif ($settings->highlight == ‘title’) : ?> there must be a change. (some kind of operator, like on line 50?)

Any help on pointing me in the right directions is appreciated. Thanks in advance.

#2

Hey Warner,

I’ve already assigned another member of the team to assist you with your concern. :slight_smile:

Ben

#3

Hi Warner,

My apologies for the delay on this. I’m not 100% sure, but it looks like your CSS selector might not be right. I think it should be something like this…

.fl-builder-content .fl-node-<?php echo $id; ?> .fl-pricing-table-column-<?php echo $i; ?> .fl-pricing-table-title,
.fl-builder-content .fl-node-<?php echo $id; ?> .fl-pricing-table-column-<?php echo $i; ?> .fl-pricing-table-byline

Give that a shot and let me know how it goes.

Justin

#4

Hi Justin,

Works great. Thanks for your help!

Warner

#5

You’re welcome!

closed #6