1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

(Ask) Mengedit Archive Title Di Wordpress

Discussion in 'Wordpress' started by vebry_exa, Jan 29, 2015.

  1. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,464
    Likes Received:
    215
    Location:
    https://vepay.id
    Para master WP, saya mau tanya dunk

    Cara ngedit title di archive gimana ya? Kok waktu saya coba klik archive pada bulan Januari 2015 pada hxxp://vebryexa.com/2015/01 kok titlenya dempet2an?

    [​IMG]

    Dempet2an begini ----> 2015 JanuaryVebry Exa BlogVebry Exa Blog

    Mau tak ubah jadi begini ----> Vebry Exa Blog - Januari 2015

    Caranya gimana ya? Di bawah ini kode archive.php

    PHP:
    <?php
    /**
     * The template for displaying Archive pages.
     */

    global $pls_archive_template;
    get_header(); ?>
    <div id="primary" class="site-content">
        <div id="content" role="main">
            <?php show_breadcrumbs();
            if ( 
    have_posts() )
                
    the_post();
            if ( 
    is_category() ) { ?>
            <h1 class="section-title"><?php printf__'Archive by category %s''newsplus' ), single_cat_title''false ) ); ?></h1>
            <?php echo category_description();
            }
            elseif ( 
    is_day() ) { ?>
            <h1 class="section-title"><?php printf__'Archive by day %s''newsplus' ), get_the_time'F j, Y' ) ); ?></h1>
            <?php }
            elseif ( 
    is_month() ) { ?>
            <h1 class="section-title"><?php printf__'Archive by month %s''newsplus' ), get_the_time'F' ) ); ?></h1>
            <?php }
            elseif ( 
    is_year() ) { ?>
            <h1 class="section-title"><?php printf__'Archive by year %s''newsplus' ), get_the_time'Y' ) ); ?></h1>
            <?php }
            if ( 
    is_author() ) :
                if ( 
    get_the_author_meta'description' ) ) : ?>
                <div class="author-info">
                    <div class="author-avatar">
                    <?php echo get_avatarget_the_author_meta'user_email' ), 64 ); ?>
                    </div><!-- .author-avatar -->
                    <div class="author-description">
                        <h1 class="author vcard"><?php printf__'About <span class="fn">%s</span>''newsplus' ), get_the_author() ); ?></h1>
                        <p><?php the_author_meta'description' ); ?></p>
                    </div><!-- .author-description -->
                </div><!-- .author-info -->
                <?php endif; // has description
            
    endif; // is author
            
    rewind_posts();
            if ( 
    'list-style' == $pls_archive_template )
                
    get_template_part'content-list' );
            elseif ( 
    'grid-style' == $pls_archive_template )
                
    get_template_part'content-grid' );
            elseif ( 
    'full-style' == $pls_archive_template )
                
    get_template_part'content-full' );
            else
                
    get_template_part'content-classic' ); ?>
        </div><!-- #content -->
    </div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer
    (); ?>
    Tolong bantuannya master, nanti ada hadiah, memang bukan berupa uang, tapi sapa tau berguna :senyum:
     

    Attached Files:

  2. amrimf

    amrimf Super Hero

    Joined:
    Jul 4, 2009
    Messages:
    2,915
    Likes Received:
    172
    Location:
    Purwokerto
    Di SEO Yoast mungkin gan, kalo di kode itu cuma buat di pagenya
     
  3. WEBDELNET

    WEBDELNET Ads.id Fan

    Joined:
    Jan 6, 2015
    Messages:
    107
    Likes Received:
    16
    Kalau mau gampang pakai plugin seo (ex. aio atau yoast)

    Kalau manual editnya dari function theme / header theme nya (masing2 theme beda), tapi kebanyakan di function nya.

    Trus, title itu aturan tempatnya di header (yang muncul di browser), kalo title yang di body yang berubah title di body nya aja (biasanya pake tag h1).

    CMIIW
    :)
     
  4. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,464
    Likes Received:
    215
    Location:
    https://vepay.id
    Hampir berhasil, hasilnya jadi gini ---> %archive_title% | Vebry Exa Blog

    [​IMG]

    Kira2 apa yang salah ya, kok %archive_title% gak bisa terdeteksi?

    Untuk kode functions.php mungkin bisa didownload di hxxps://userscloud.com/qwpzsjdxu6b6
     

    Attached Files:

    Last edited: Jan 31, 2015
  5. amrimf

    amrimf Super Hero

    Joined:
    Jul 4, 2009
    Messages:
    2,915
    Likes Received:
    172
    Location:
    Purwokerto
    Harusnya %%term_title%% gan
     
  6. cucukrawa

    cucukrawa Newbie

    Joined:
    Jan 15, 2015
    Messages:
    11
    Likes Received:
    0
    Cari di google bang caranyahhh
     
  7. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,464
    Likes Received:
    215
    Location:
    https://vepay.id
    Solve by amrimf

    Cek PM untuk hadiahnya om :salaman:
     
    beruangkutub likes this.

Share This Page