hallo,
ich habe ein kleines Problem. Ich würder gerne in meinem Wordpress Blog in das Header-menü ein Permalink zu einer Seite einbauen. Die seite befindet sich aber auch im Wordpress system.
Das is ja an und für sich kein Problem, nur wenn ich den Link da einfüge passt das mit dem "Chosen site" also die markierung auf welcher seite man sich gerade befindet natürlich nicht mehr. Das Li tag hat als klass einen if...else code der auswählt ob man auf der seite ist oder nicht.
hier der code:
<li class="<?php if (!is_paged() && is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="?page_id=2">Impressum</a></li>
</div>
auf einer wodpress seite habe ich folgende beschreibungen zu den Tags gefunde:
Zitat
is_paged()
When the page being displayed is "paged". This refers to an archive or the main page being split up over several pages and will return true on 2nd and subsequent pages of posts. This does not refer to a Post or Page whose content has been divided into pages using the <!--nextpage--> QuickTag. To check if a Post or Page has been divided into pages using the <!--nextpage--> QuickTag, see #Testing_for_paginated_Pages.
is_home()
When the main blog page is being displayed. This is the page which is showing the time based blog content of your site, so if you've set a static Page for the Front Page (see below), then this will only be true on the Page which you set as the "Posts page" in Administration > Settings > Reading.
Also ich bräuchte dann sowas wie :
if (#meineseite# && is_paged) {#link markieren das augewählt#};
komm da aber leider nicht weiter.. bin erst ein php beginner! :)
würde mich über hilfe freuen! danke