PageNavi Style Code wo einfügen??

  • Hallo,

    habe mir das Page Navi Style Plugin installiert. Jetzt soll ich den folgenden Code einfügen:

    <div class="navigation">
    <?php wp_pagenavi(); ?>
    </div>

    dieser Code soll den originalen meines Themas (Twentyten) ersetzen.

    Original:
    <div class="navigation">
    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    </div>

    Nur in welcher Datei finden ich denn den Coder überhaupt? :roll:

    Mfg Tom

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Hallo Tom,

    im aktuellen TwentyTen fine ich nur ähnlichen Code in der loop.php und loop-single.php. Einfach Sicherheitskopie der Dateien anlegen und dann probieren ;-)

  • Muss das Thema nochmals etwas "hoch befördern"...! Hat keiner ne Lösung parat? Wenn ich die loop.php bearbeite und <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div> w wie beschrieben mit <?php wp_pagenavi(); ? ersetze zerstört es mir die Seite und das war´s :roll: Es muss doch eine Möglichkeit geben das beim "twentyten" die Seitenanzahl angezeigt wird. Ich wäre über jede Hilfe wirklich dankbar.

    Mfg Tom

  • Hab mir selbst die Antwort gegeben. Mit dem Plugin WP-Paginate ist es möglich. In der loop.php habe ich folgendes geändert:

    [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]/* Display navigation to next/previous pages when applicable */ [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    <?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]if ( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$wp_query[/FONT][/COLOR][COLOR=#007700][FONT=monospace]->[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]max_num_pages [/FONT][/COLOR][COLOR=#007700][FONT=monospace]> [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]1 [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) : [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace] <div id="nav-below" class="navigation">[/FONT][/COLOR]
    [COLOR=#000000][FONT=monospace] <div class="nav-previous">[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php next_posts_link[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]__[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'<span class="meta-nav">&larr;</span> Older posts'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'twentyten' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ); [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR][COLOR=#000000][FONT=monospace]</div>[/FONT][/COLOR]
    [COLOR=#000000][FONT=monospace] <div class="nav-next">[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php previous_posts_link[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]__[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'Newer posts <span class="meta-nav">&rarr;</span>'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'twentyten' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ); [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR][COLOR=#000000][FONT=monospace]</div>[/FONT][/COLOR]
    [COLOR=#000000][FONT=monospace] </div><!-- #nav-below -->[/FONT][/COLOR]
    [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]endif; [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>

    ersetzt durch:

    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]/* Display navigation to next/previous pages when applicable */ [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    <?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]if ( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]$wp_query[/FONT][/COLOR][COLOR=#007700][FONT=monospace]->[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]max_num_pages [/FONT][/COLOR][COLOR=#007700][FONT=monospace]> [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]1 [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) : [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace] <div id="nav-below" class="navigation">[/FONT][/COLOR]
    [COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]if([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]function_exists[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'wp_paginate'[/FONT][/COLOR][COLOR=#007700][FONT=monospace])) { [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]wp_paginate[/FONT][/COLOR][COLOR=#007700][FONT=monospace](); } else { [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace] <div class="nav-previous">[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php next_posts_link[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]__[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'<span class="meta-nav">&larr;</span> Older posts'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'twentyten' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ); [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR][COLOR=#000000][FONT=monospace]</div>[/FONT][/COLOR]
    [COLOR=#000000][FONT=monospace] <div class="nav-next">[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php previous_posts_link[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]__[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'Newer posts <span class="meta-nav">&rarr;</span>'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'twentyten' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ); [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR][COLOR=#000000][FONT=monospace]</div>[/FONT][/COLOR]
    [COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]} [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace] </div><!-- #nav-below -->[/FONT][/COLOR]
    [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]endif; [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>

    Und auf der Startseite http://www.sunshine-shopping.com wird jetzt die Navigation angezeigt.

    Mfg Tom


    [/FONT][/COLOR]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!