Change Title from h4 to h2

How to change <h4 class="mfp_infinity_title">Title</h4> to <h2 class="mfp_infinity_title">Title</h2>
       
  • Replied by admin on Friday, November 12 2021, 01:41 AM · Hide· #1
    Hi, You can do that via template override. Please open file infinity_ajax.php
    At lines 74-78 you will see this code :
    <h4 class="mfp_infinity_title">    
                <a href="/<?php echo $item->link; ?>" itemprop="url">
                    <?php echo JHtmlString::truncate(strip_tags($item->title), $title_truncate);  ?>
                </a>
            </h4>


    change that into

    <h2 class="mfp_infinity_title">    
                <a href="/<?php echo $item->link; ?>" itemprop="url">
                    <?php echo JHtmlString::truncate(strip_tags($item->title), $title_truncate);  ?>
                </a>
            </h2>
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by jtausa on Friday, November 12 2021, 03:22 AM · Hide· #2
    Ok thank you, I made the change from h4 to h2.
    I have a problem with the "Read More" override:
    If I make the change indicated for href the error page appears: This site can’t be reached because it redirects to a link without domainname.com
    <a href="/<?php echo $item->link; ?>" style="font-size:16px;font-weight:700;color:white;background:blue;display:inline-block; padding:5px 7px;">Read More</a>
    If I suppress the slash in href it shows the article on the home page, although the url shown is the correct article address.
    <a href="/<?php echo $item->link; ?>" style="font-size:16px;font-weight:700;color:white;background:blue;display:inline-block; padding:5px 7px;">Read More</a>
    What is the solution to show the article in the correct menu item?
  •  
  • Replied by admin on Friday, November 12 2021, 07:34 AM · Hide· #3
    If I suppress the slash in href it shows the article on the home page, although the url shown is the correct article address.

    This is likely a known issue with default Joomla itemid behaviour. Please try to create a hidden menu item (can be category / blog page layout) for your content category where the module showed. We have youtube tutorial for that issue you can check : https://www.youtube.com/watch?v=YxLnp5mZPs0
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by jtausa on Friday, November 12 2021, 10:08 AM · Hide· #4
    Excuse me, could you give me an explanation with more details, since I don't really understand what to do?
  •  
  • Replied by jtausa on Friday, November 12 2021, 08:14 PM · Hide· #5
    I made a solutions salad that solved the problem:
    1. I used your override solution without the slash:
    <?php } ?>
    <a href="/<?php echo $item->link; ?>" style="font-size:16px;font-weight:700;color:white;background:#083061;display:inline-block; padding:5px 7px;">Leer Artículo completo</a>
    2. Change the alias to the original menu item "Cuba" to (Alias: noticias-de-cuba-original) Hidden, Articles » Single Article, and "unpublished"
    3. I created a new menu item:
    Cuba (Alias: cuba-noticias) Articles » Category Blog and published to replace the original menu item Cuba.
    Although I don't know exactly which change or changes solved the problem after many tests
  •  
  •  
    Replied by admin on Saturday, November 13 2021, 06:14 AM · Hide· #6
    3. I created a new menu item:
    Cuba (Alias: cuba-noticias) Articles » Category Blog and published to replace the original menu item Cuba.
    This is the similar solution with the one proposed in the video above.
    Glad it works for you ;)
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments