Post Archive by month

Good mornig,
I was tring to delete the title “Post Archive by month” in my blog.
I tried this instruction on CSS, as I read in a topic:

.archive.date .entry-header {
display: none;
}

The problem is that this instruction doesn’t work.
Or, at least, to have the Month and Year instead of “Post archive by month”, because there isn’t any possibility to understand in which page I am after I click on an archive by month.
This is the link: https://hagarlane.com/2020/02/
It is an example, of course, because the problem exists for every month.
Thank you so much

Hello Patrizia,

Thanks for writing in!

Do you want something like this?

If that is the case, then you will have to use this custom css code instead:

.archive.date .x-header-landmark {
    display: none;
}

We would love to know if this has worked for you. Thank you.

Thak you, Ruel.
It is perfect, but I’d like to see the month in the header, or when I select a month in the archive… I don’t have something that indicate the month. Is it possible?
Thank you

Hello Patrizia,

Please remove the previous custom css and then since the child theme is set up, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/ETHOS/_LANDMARK-HEADER.PHP
// -----------------------------------------------------------------------------
// Handles content output of large headers for key pages such as the blog or
// search results.
// =============================================================================

$disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );

?>

<?php if ( ! x_is_blank( 1 ) && ! x_is_blank( 2 ) && ! x_is_blank( 4 ) && ! x_is_blank( 5 ) ) : ?>
  <?php if ( is_page() && $disable_page_title == 'on' ) : ?>
  <?php else : ?>

    <?php if ( x_is_shop() || x_is_product() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo x_get_option( 'x_ethos_shop_title' ); ?></span></h1>
      </header>

    <?php elseif ( x_is_bbpress() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1>
      </header>

    <?php elseif ( x_is_buddypress() ) : ?>
      <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?>

        <header class="x-header-landmark x-container max width">
          <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1>
        </header>

      <?php endif; ?>
    <?php elseif ( is_page() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1>
      </header>

    <?php elseif ( x_is_portfolio_item() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
      </header>

    <?php elseif ( is_search() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>
      </header>

    <?php elseif ( is_category() || x_is_portfolio_category() || x_is_product_category() ) : ?>

      <?php

      $meta  = x_get_taxonomy_meta();
      $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' );

      ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>
      </header>

    <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?>

      <?php

      $meta  = x_get_taxonomy_meta();
      $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' );

      ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
      </header>

    <?php elseif ( is_404() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>
      </header>

    <?php elseif ( is_year() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Yearly Archives: ', '__x__' ); ?><?php echo get_the_date('Y'); ?></span></h1>
      </header>

    <?php elseif ( is_month() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Monthly Archives:', '__x__' ); ?><?php echo get_the_date('F Y'); ?></span></h1>
      </header>

    <?php elseif ( is_day() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Daily Archives:', '__x__' ); ?><?php echo get_the_date(); ?></span></h1>
      </header>

    <?php elseif ( x_is_portfolio() ) : ?>

      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo x_get_option( 'x_portfolio_title' ); ?></span></h1>
      </header>

    <?php endif; ?>

  <?php endif; ?>
<?php endif; ?>

3] Save the file named as _landmark-header.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/legacy/cranium/headers/views/ethos/

You will need to create the folder path because it does not exist yet.

Hi Runel,
first of all, thank you for your answer.
I don’t use a local server for my website. I use the normale version of Wordpress, without a local server. Can I solve the problem in this case?
May I customize this file, as you can see in my upload?
Thank you

Hey Patrizia,

By local machine, Ruenel simply meant your computer. He said you must create the _landmark-header.php file on your computer.

We’re not familiar with the child theme configurator so please follow Ruenel’s instruction.

Thanks.

Hi, Christian,
I did understand that Runel said “in my computer”.
So, please, can you indicate to me the path in wordpress in order to upload the file _landmark-header.php in my Ethos X-child theme?
Thank you so much

Hey Patrizia,

That was mentioned by Ruenel previously.

I don’t have a server. I’m using NOT a local server, I repeat to you, but a website without local folders.
Please, Christian, are you jocking?
You are repeating the word of another person, so it’s better for me to talk with the other person, are you agree?
Best regards.

Hi Patrizia,

Sorry if you feel that way, but all sites (files) resides on a server else the site won’t be up on the internet.

I believe what do you mean is you don’t have FTP access because the hosting (or your plan) does not allow, or is it? So that is why you’re using that Child Theme Configurator plugin, right? But we are not in the position to give instruction for that plugin because that is a 3rd party plugin and we are not familiar with it, it is better if you contact the plugin support. I think that plugin would not able to complete Ruenel’s instruction above because on step 4 you need to create a few subfolders (but again we are not familiar with that plugin).

I know you understand Ruenel’s instruction above, but that requires you to use FTP, you need to ask your hosting for FTP credentials if they do provide.

Please watch this video, this will give you idea how FTP works.
How to Use Filezilla FTP Client

If not, contact the Child Theme Configurator plugin support and show them Ruenel’s instruction and ask if that is possible to do with their plugin.

If still not, then you need to find a File Manager plugin, however this is not recommended, as one tiny mistake with PHP code can lock up your site, so again FTP is still the best thing to do this customization. If your hosting does not provide FTP credentials then there is nothing we can do about it.

Thank you for understanding,

Perfect Friech!
You was very helpful. It was enogh write to me “Child Theme Configurator plugin” as you did. Now I can go ahead.
I have appreciated a lot your answers and Runel’s answers.
Thank you so much.
A big hug.

Hey Patrizia,

We’re glad that we finally have pointed you in the right direction. I was not joking when I repeated what Ruenel said. You asked about the path and I gave it to you only that my answer is the same as Runel’s that’s why I posted his response instead to remind you that it was mentioned.

It’s only your reply before Friech that I now understood that you don’t know the WordPress file system at all. I thought you knew when you asked about that path.

Hi Runel and Friech,
I have a small question, it’s more a curiosity: In Every widget in my blog I can select a category or other thinks and I can see the new title on my blog (for example: Category “Recensito da me” or “Scrivere”, etc). In Archive by month there is the problem that the new title (the month that I select) doesn’t appeare.
Is it a bug or not? I’m thinking about your solution, but I can’t apply your solution. So, Will you create a new release with this problem solved? :slight_smile:
Thank you so much

Hello Patrizia,

If you can provide us your WP Access or the FTP access to your site, it would be great. We will create the child theme for you and implement what I have suggested with the given steps above. I am not sure about the widgets though. Are you referring to the widgets in Appearance > Widgets?

Thank you in advance.

Hi Runel.
I’d love to do my WP account to you, but only in a private message, not here, where the world can read it :slight_smile: So, how can I send you my account?
Thank you so much

Hi Patrizia,

Kindly post the login details in this thread but send it as a Secured Note so that it will only be visible to the staff.

Thank you to everyone.
I have solved thanks the file of Runel.
A big hug.

You’re more than welcome, glad we could help.

Cheers!

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