This is similar to the effect I’m trying to achieve using Newspaper 6.3:
You see how on their inner column we have the red title (sans serif) and then the lighter subtitle (serif).
I’m building this module off of 5. I’m using the plugin method and I have had success making custom styles this way.
My attempt is something like this:
<div class="<?php echo $this->get_module_classes();?>" <?php echo $this->get_item_scope();?>>
<?php echo $this->get_title();?>
<?php echo $this->get_quotes_on_blocks(); ?>
<?php echo $this->get_item_scope_meta(); ?>
<div class="td-module-image">
<?php echo $this->get_image('td_417x235');?>
<?php if (td_util::get_option('tds_category_module_5_2') == 'yes') { echo $this->get_category(); }?>
</div>
</div>
But I’m not sure how to go about creating the custom CSS and using the correct variables to make this happen. Any assistance would be greatly appreciated!
-
This topic was modified 11 years by
Johnny.
After poking around I’ve found where I need to make the change, it’s in the wp_booster/td_module.php.
But that means I need to do something like, “If module_6_2, then load td_module-new.php” because I don’t want to make this change for EVERY module, just this one. Any suggestions? Thanks!
-
This reply was modified 11 years by
Johnny.
Hi,
you can add a class just to this module by changing
$this->get_module_classes()
to
$this->get_module_classes(array('your_module_class'))
This will add .your_module_class to your module wrapper class and you can use it to style the module differently.
Let me know if it’s what you need and if it works. If you encounter problems, please give me more details and I will help you out if it’s possible. Please note that I will only get back Monday đ
Radu O.
Thank you very much for your suggestion. To achieve this I need to change the module title’s default h3 to inline h3 or even a span class.
function get_title($cut_at = '') {
$buffy = '';
$buffy .= '<h3 itemprop="name" class="entry-title td-module-title">';
$buffy .='href . '" rel="bookmark" title="' . $this->title_attribute . '">';
I’m not sure I can create a new class if that h3 styling is in the td_module.php since that markup isn’t created with a variable, as I understand it. I will need to overwrite that h3 styling or replace it entirely I think.
Hi,
From what i understand you want to publish the quote right after the title, like it’s on the example link – http://screencast.com/t/kjS68tvqhpf
You added the title and the quote lines and now you need custom css which targets this specific module. By default each module comes with it’s own class but if you’re using a custom one you may want to add a custom class to it. Use Radu’s method to add it. The create the custom css to properly position that element, ex:
.your_module_class .element_class {
display: inline;
}
If you can’t figure it out please provide the url and we’ll take a look.
Thank you!
-
This reply was modified 11 years by
Emil G.