[wp-hackers] Page Tags

Alex Koti alexkoti at gmail.com
Sat Aug 7 14:39:56 UTC 2010


Hi,

> But I can get the tags from custom post types, regular post, etc.
echo get_the_term_list( $post->ID, 'post_tag', 'Not Empty', ', ', '.' );


> Well, first off I suppose, how are you assigning tags to your pages?

function register_page_tags(){
     register_taxonomy_for_object_type( 'post_tag', 'page' );
}
add_action('init', 'register_page_tags');



Alex Koti


2010/8/6 Jason LeVan <jason at blueluna.com>
>
> Well, first off I suppose, how are you assigning tags to your pages? Pages
> by default do not make use of tags or categories:
> http://codex.wordpress.org/Pages#Pages_in_a_Nutshell
>
> If you need to assign tags to pages, would it be more appropriate to use a
> custom post type? Or perhaps to use the parent/child relationship inherent
> in pages? It sounds like you need to display "related" pages, would it
> perhaps make sense to display sibling pages?
>
>
> On Fri, Aug 6, 2010 at 2:24 PM, Devin Dixon <devin at tayloegray.com> wrote:
>
> > Hey,
> >
> > I have pages in Wordpress 3.01 and those pages have tags associated
> > with it. Now when I go to pull the tags out, it comes up empty. But I
> > can get the tags from custom post types, regular post, etc.
> >
> >
> >
> > $posttags = get_the_tags(get_the_ID());
> > if ($posttags) {
> > echo 'Not Empty';
> > foreach($posttags as $tag) {
> > echo $tag->name . ' ';
> > }
> > }
> >
> > Does anyone have any idea how to get the tags from pages and can those
> > tags be used to get other pages in a WP_Query?
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
>
> --
> ———————
> jason levan
> BlueLuna
>
> 617.938.3944 x709
> www.blueluna.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list