On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of the first beta of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




replacement for get_page_category()?

UserPost

3:43 am
29 Oct 2007


Ardenstone

Guest

1

I’ve been using and enjoying the previous version, but upgraded to 2.3 and switched to the new one.  It looks great, but I was making use of the template function ‘get_page_category()’.  Is there something similar for this version, or is there another way to do it?  When the user lands on a page, I pull back the current category and then use that to see what pages are associated with it.  Do you know how to do this in the new version?

Hope you are well and thanks very much!

11:03 am
29 Oct 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2

You should be able to use the standard WP template tags with PCP instead and achieve the same things.

7:45 pm
31 Oct 2007


Ardenstone

Guest

3

Excellent, thanks for the feedback.  In case anyone else has the same issue, the code can be found at:

http://codex.wordpress.org/Template_Tags/get_the_category

If you know the pages will only have one category, you can just use:

$cat = get_the_category(); $cat = $cat[0]; echo $cat->cat_ID;
 

Thanks again! 

 

9:21 pm
31 Oct 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

I am sorry my answer was a bit short the other day. I was just on my way out… but I should have looked it up for you.

So thanks for posting back here wth the details 



Reply to Topic: replacement for get_page_category()?

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 11 + 4        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

19 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)