Blog index htag

Hi there, I have this page as my blog index:

I was wondering if there is a way to remove the Htags form the heading/title whilst keeping the same look, ie the same size.

Also, I would like to remove the links from the image, and title, so just “More>>” is the link.

so it is not duplicating content.

Hi,

To achieve that, kindly do the following

  1. Setup a child theme - https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

  2. Create file _content-post-header.php in wp-content\themes\pro\framework\views\ethos and copy the code below into that file.

<?php

// =============================================================================
// VIEWS/ETHOS/_CONTENT-POST-HEADER.PHP
// -----------------------------------------------------------------------------
// Standard <header> output for various posts.
// =============================================================================

?>

<header class="entry-header">
  <?php if ( is_single() ) : ?>
    <?php x_entry_navigation(); ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
  <?php else : ?>
    <p class="entry-title" style="font-size: 30px;">
      <?php x_the_alternate_title(); ?>
    </p>
  <?php endif; ?>
  <?php x_ethos_entry_meta(); ?>
</header>
  1. Add the code below in your child theme’s functions.php file.
  function x_ethos_featured_index() {

    ?>

      <a href="#" class="entry-thumb<?php echo $index_featured_layout_class; echo $index_featured_size_class; ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> </a>

    <?php

  }
  1. Add this in Theme Options > CSS
.blog .entry-featured a.entry-thumb:before {
    display:none;
}

.blog .entry-featured a {
    pointer-events: none;
    cursor: default;
}

Hope that helps

That worked great for the thumbnail, but Id like to take the link off of the title too, and the HTAG, but keep it the same size…

Hi There,

Please also add this custom CSS:

h2.entry-title a {
    pointer-events: none;
  cursor: default;
}

Hope it helps :slight_smile:

That has only taken the link off, I would like to remove the htag too

Hi logoglo,

To allow us to check the child theme files created, please provide WordPress Dashboard and FTP login details in a “Secure Note”.

Thanks.

I haven’t created a child theme (I didn’t know how before I made a load of site changes, so I just change the files every time you update, though I did create the file in the correct folder, the other css code worked. I will give you login details

Hi,

This is the correct file, no need to create it as you are not using a child theme

Change the code in there with this

<?php

// =============================================================================
// VIEWS/ETHOS/_CONTENT-POST-HEADER.PHP
// -----------------------------------------------------------------------------
// Standard <header> output for various posts.
// =============================================================================

?>

<header class="entry-header">
  <?php if ( is_single() ) : ?>
    <?php x_entry_navigation(); ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
  <?php else : ?>
    <p class="entry-title" style="font-size: 30px;">
      <?php x_the_alternate_title(); ?>
    </p>
  <?php endif; ?>
  <?php x_ethos_entry_meta(); ?>
</header>

Thanks

That worked! thanks

I’m glad it worked, you are welcome :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.