Beiträge von nature225


    Das ist meine single-portfolio.php


    in Zeile 109 - Zeile 123 habe ich die Navigation, die NUR durch die selben Kategorien switscht.

    [COLOR=#252C2F][FONT=Helvetica]Guten Morgen alle zusammen,[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]bin gerade dabei für Portfolios eine Navigation innerhalb der selben Kategorie zu programmieren.[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]Soweit klappt auch alles. Allerdings soll die Navigation, wenn die Kategorie "Pressemitteilungen" lautet nicht angezeigt werden[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]Mit untenstehenden Code lasse ich schoneinmal alle Portfolio Kategorien anzeigen, die existieren.[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica][FONT=inherit]PHP-Code:[/FONT]
    [FONT=Courier][FONT=inherit][COLOR=#0000BB][FONT=inherit]$terms [/FONT][/COLOR][COLOR=#007700][FONT=inherit]= [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]get_terms[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'portfolio_filter' [/FONT][/COLOR][COLOR=#007700][FONT=inherit]);
    [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$count [/FONT][/COLOR][COLOR=#007700][FONT=inherit]= [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]count[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$terms [/FONT][/COLOR][COLOR=#007700][FONT=inherit]);
    if ( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$count [/FONT][/COLOR][COLOR=#007700][FONT=inherit]&[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]gt[/FONT][/COLOR][COLOR=#007700][FONT=inherit]; [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]0 [/FONT][/COLOR][COLOR=#007700][FONT=inherit]) {
    echo [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'<h3>Gesamt Portfolio Kategorien: '[/FONT][/COLOR][COLOR=#007700][FONT=inherit]. [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$count [/FONT][/COLOR][COLOR=#007700][FONT=inherit]. [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'</h3>'[/FONT][/COLOR][COLOR=#007700][FONT=inherit];
    echo [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'<ul>'[/FONT][/COLOR][COLOR=#007700][FONT=inherit];
    foreach ( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$terms [/FONT][/COLOR][COLOR=#007700][FONT=inherit]as [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$term [/FONT][/COLOR][COLOR=#007700][FONT=inherit]) {
    echo [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'<li>' [/FONT][/COLOR][COLOR=#007700][FONT=inherit]. [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$term[/FONT][/COLOR][COLOR=#007700][FONT=inherit]-&[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]gt[/FONT][/COLOR][COLOR=#007700][FONT=inherit];[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]name [/FONT][/COLOR][COLOR=#007700][FONT=inherit]. [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'</li>'[/FONT][/COLOR][COLOR=#007700][FONT=inherit];
    }
    echo [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'</ul>'[/FONT][/COLOR][COLOR=#007700][FONT=inherit];
    }
    [/FONT][/COLOR][/FONT][/FONT]
    [/FONT][/COLOR]
    [COLOR=#252C2F][FONT=Helvetica]Damit erstelle ich die Navigation:[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica][FONT=inherit]PHP-Code:[/FONT]
    [FONT=Courier][FONT=inherit] [COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]if ( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]is_a[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$prev_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit], [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'WP_Post' [/FONT][/COLOR][COLOR=#007700][FONT=inherit]) ) { [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>
    [/FONT][/COLOR] <div class="next">
    <a href="[COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]echo [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]get_permalink[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$prev_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit]->[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]ID [/FONT][/COLOR][COLOR=#007700][FONT=inherit]); [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>[/FONT][/COLOR]">[COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]echo [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]get_the_title[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$prev_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit]->[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]ID [/FONT][/COLOR][COLOR=#007700][FONT=inherit]); [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>[/FONT][/COLOR] <i class="fa fa-chevron-right" aria-hidden="true"></i> </a>
    </div>
    [COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]} [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>
    [/FONT][/COLOR]
    [COLOR=#0000BB][FONT=inherit]<?php $next_post [/FONT][/COLOR][COLOR=#007700][FONT=inherit]= [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]get_adjacent_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]true[/FONT][/COLOR][COLOR=#007700][FONT=inherit], [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]''[/FONT][/COLOR][COLOR=#007700][FONT=inherit], [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]false[/FONT][/COLOR][COLOR=#007700][FONT=inherit], [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'portfolio_filter' [/FONT][/COLOR][COLOR=#007700][FONT=inherit]); [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>
    [/FONT][/COLOR] [COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]if ( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]is_a[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$next_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit], [/FONT][/COLOR][COLOR=#DD0000][FONT=inherit]'WP_Post' [/FONT][/COLOR][COLOR=#007700][FONT=inherit]) ) { [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>
    [/FONT][/COLOR] <div class="prev">
    <a href="[COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]echo [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]get_permalink[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$next_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit]->[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]ID [/FONT][/COLOR][COLOR=#007700][FONT=inherit]); [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>[/FONT][/COLOR]"><i class="fa fa-chevron-left" aria-hidden="true"></i> [COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]echo [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]get_the_title[/FONT][/COLOR][COLOR=#007700][FONT=inherit]( [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]$next_post[/FONT][/COLOR][COLOR=#007700][FONT=inherit]->[/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]ID [/FONT][/COLOR][COLOR=#007700][FONT=inherit]); [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>[/FONT][/COLOR] </a>
    </div>
    [COLOR=#0000BB][FONT=inherit]<?php [/FONT][/COLOR][COLOR=#007700][FONT=inherit]} [/FONT][/COLOR][COLOR=#0000BB][FONT=inherit]?>[/FONT][/COLOR] <!-- End Navigation -->[/FONT][/FONT]
    [/FONT][/COLOR]
    [COLOR=#252C2F][FONT=Helvetica]Hat jemand eine Idee, Vorschlag o.Ä. wie ich mein vorhaben umsetzen könnte?[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]Stehe gerade ziemlich auf den Schlauch.[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]Kurz zusammengefasst:[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]Navigation soll nicht angezeigt werden, wenn die Portfolio Kategorie == Pressemitteilungen ist. Ansonsten kann sie immer angezeigt werden,[/FONT][/COLOR]

    [COLOR=#252C2F][FONT=Helvetica]Ich bedanke mich bei jedem für seine Hilfe [/FONT][/COLOR]:)