Re: Customize the sidebar, depending on author :: Reply by master

von Joern am 8. Jul. 2010 | Keine Kommentare

I guess you query for a certain category and want to show posts of the current author only?
Let’s say you query for a category like this:
to get this query display only posts of the author you just show, you can get the current author ID like this:
and add in the query you use: &author=$authid
the code getting the current author and looking for his posts in category 4 would look like this:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

title and content here

<?php endwhile; else: ?>

<?php endif; ?>

<?php //Reset Query

did not try, you are my ‚beta tester‘ ;-)
you find me on Google+, Twitter and Facebook

(von: master)

Hier noch 2 weitere Ergebnisse dieses Threads:

Customize the sidebar, depending on author

8. Jul. 2010 (von: adamwork)

Hi allSo here is my situation.I have author.php, which shows a list of latest posts from that author. On the top right hand corner, I then have information about the author (Biog, Name etc).Underneath that, I want to display posts…

Re: Customize the sidebar, depending on author :: Reply by adamwork

8. Jul. 2010 (von: adamwork)

Hi masteradminThe main page already shows the post of the author. I want to display posts from a different category in the sidebar. The category in the sidebar will be different, depending on the author.Thanksadam Weiterlesen →


Du findest mich auch auf Google+, Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.

weitere forum Beiträge: