• Resolved keepact

    (@keepact)


    I was able to add the description to the month and year of Archive page by copying the entire astra_archive_page_info function and adding the descriptions I wanted. Is it possible to add less code to have the same result?

    Here is the code I added:

    // Month.
    } elseif ( is_month() ) {
    ?>

    <section class="ast-archive-description">
    <?php do_action( 'astra_before_archive_title' ); ?>
    <?php the_archive_title( '<h1 class="page-title ast-archive-title">', '</h1>' ); ?>
    <p>Description Text Test</p>
    <?php do_action( 'astra_after_archive_title' ); ?>

    <?php do_action( 'astra_after_archive_description' ); ?>
    </section>

    <?php

    PS: I try use add_filter but it works only for the description of the filter, the rest disappear if I do not copy the entire function.

    Thanks’s in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter keepact

    (@keepact)

    The answer to another question about “Remove” Archive: “Text” helped me and I solved it. If anyone needs this is the code:

    add_filter( 'get_the_archive_description', 'custom_archive_description' );
    function custom_archive_description( $description ) {
    if ( is_post_type_archive() || is_month() ) {
    $description = '<p>test</p>';
    }
    return $description;
    }

    PS: The answers of this support are very valuable ??

    Hi @keepact ,

    Glad that you shared the solution. That would surely help other people in this community.

    Regards,
    Deepak

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Astra Page Info Filter’ is closed to new replies.