Change to in sidebar

Posted in: Newsmag
Post count: 217

Hi,

how to change the <h2> </h2> in the sidebar posts (Block 13) to <h4>? I looked literally in every file, but I didn’t find any option.

Thanks!

http://www.promicabana.de/robert-pattinson-keine-zeit-fuer-venedig/

Post count: 217

I know why this is happening…I changed the headings in the td_module.php to <h2> to get <h2> on my front page. How can I change separately the headings for the sidebar? I think it’s Block 1 not 3. My front page must be module 11.

Summary:

I want <h2> on my posts at the front page and <h4> for the sidebar posts.

function get_title($cut_at = '') {
        $buffy = '';
        $buffy .= '<h2 itemprop="name" class="entry-title td-module-title">';
        $buffy .='<a>href . '" rel="bookmark" title="' . $this->title_attribute . '">';

        //see if we have to cut the title and if we have the title lenght in the panel for ex: td_module_6__title_excerpt
        if ($cut_at != '') {
            //cut at the hard coded size
            $buffy .= td_util::excerpt($this->title, $cut_at, 'show_shortcodes');

        } else {
            $current_module_class = get_class($this);

            //see if we have a default setting for this module, and if so only apply it if we don't get other things form theme panel.
            if (td_api_module::_check_excerpt_title($current_module_class)) {
                $db_title_excerpt = td_util::get_option($current_module_class . '_title_excerpt');
                if ($db_title_excerpt != '') {
                    //cut from the database settings
                    $buffy .= td_util::excerpt($this->title, $db_title_excerpt, 'show_shortcodes');
                } else {
                    //cut at the default size
                    $module_api = td_api_module::get_by_id($current_module_class);
                    $buffy .= td_util::excerpt($this->title, $module_api['excerpt_title'], 'show_shortcodes');
                }
            } else {
                /**
                 * no $cut_at provided and no setting in td_config -> return the full title
                 * @see td_global::$modules_list
                 */
                $buffy .= $this->title;
            }

        }
        $buffy .='</a>';
        $buffy .= '</h2>';
  • This reply was modified 10 years by Bichareh.
  • This reply was modified 10 years by Bichareh.
Post count: 217

I really don’t get it. Block 5 has <h2> too. How to change this? I’m really confused.

Post count: 6535

Hi

You need to modify the td_module.php file like here: http://screencast.com/t/AgfUgRbYMVv but notice that the changes will affect every article title from modules because the get_title() function it’s used on every modules and blocks.

Thanks!

Post count: 217

Are you sure? Because I changed the get_title() function, but it worked only on my front page posts. The sidebar posts do still have <h2>. I deleted all WP Caches and the Browser Cache.

Take a look: http://www.promicabana.de/kristen-stewart-erst-beziehungskrise-heimliche-hochzeit/

Post count: 217

Nevermind…I forget to delete the Widget Cache. Now it works. But it would be great, of you can split these things up.

On the front page and the categories/tags I need the posts in <h2>. Now I have to let them in <h3>, because I don’t want <h2> in the sidebar. Thats stupid.

Thanks!

Post count: 9544

Frankly anything can be <h2> or <h3> contextually as long as it’s not h1.
In reality those elements are only used for identifying it’s a headline — one size is not better than another for anything other than applying a style sheet; or within one “group” where an h2 would be shown “semantically” to be superior to an h3 tag.

So, in sidebar widget it really makes no functional or semantic difference whether h2 or h3.

Not a help, I know — just an observation.

In other words, both could be h3 and then apply different size class to the div wrapper to adjust font/size/style per “class” …

Google doesn’t make it “better” or anything because it’s h2 in short term relational content that lives outside the main “article” block.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newsmag’ is closed to new topics and replies.