The Stack Overflow podcast is back! Listen to an interview with our new CEO.
3 Clarified title, retagged, removed noise
source | link

I'm trying How is get_the_author connected to fill in some blanks on my Wordpress Development journeya custom post type?

I am having issues with certain concepts regarding Wordpress and it's development, if anyone could clarify things for me that would be great!

I have an understanding of PHP classes and an understanding of how to generate and work with Wordpress Custom Post Types, are CPT's objects of a class i.e. is there a 'Post' object and custom post types are just objects of the class?

The reason I ask is; if I create a new Custom Post Type and use functions such as get_the_author() on my custom post type then the functions work, although I haven't necessarily defined the author while setting the CPT up.

I am presuming that this is because it is of the post object and the author is a property set by a setter when ANY post type is created? but this is where my understanding falls down a little.

If anyone is kind enough to help me join some dots that would be brilliant thank you.

Thanks in advance.

I'm trying to fill in some blanks on my Wordpress Development journey?

I am having issues with certain concepts regarding Wordpress and it's development, if anyone could clarify things for me that would be great!

I have an understanding of PHP classes and an understanding of how to generate and work with Wordpress Custom Post Types, are CPT's objects of a class i.e. is there a 'Post' object and custom post types are just objects of the class?

The reason I ask is; if I create a new Custom Post Type and use functions such as get_the_author() on my custom post type then the functions work, although I haven't necessarily defined the author while setting the CPT up.

I am presuming that this is because it is of the post object and the author is a property set by a setter when ANY post type is created? but this is where my understanding falls down a little.

If anyone is kind enough to help me join some dots that would be brilliant thank you.

Thanks in advance.

How is get_the_author connected to a custom post type?

I am having issues with certain concepts regarding Wordpress and it's development, if anyone could clarify things for me that would be great!

I have an understanding of PHP classes and an understanding of how to generate and work with Wordpress Custom Post Types, are CPT's objects of a class i.e. is there a 'Post' object and custom post types are just objects of the class?

The reason I ask is; if I create a new Custom Post Type and use functions such as get_the_author() on my custom post type then the functions work, although I haven't necessarily defined the author while setting the CPT up.

I am presuming that this is because it is of the post object and the author is a property set by a setter when ANY post type is created? but this is where my understanding falls down a little.

2 edited tags
| link
1
source | link

I'm trying to fill in some blanks on my Wordpress Development journey?

I am having issues with certain concepts regarding Wordpress and it's development, if anyone could clarify things for me that would be great!

I have an understanding of PHP classes and an understanding of how to generate and work with Wordpress Custom Post Types, are CPT's objects of a class i.e. is there a 'Post' object and custom post types are just objects of the class?

The reason I ask is; if I create a new Custom Post Type and use functions such as get_the_author() on my custom post type then the functions work, although I haven't necessarily defined the author while setting the CPT up.

I am presuming that this is because it is of the post object and the author is a property set by a setter when ANY post type is created? but this is where my understanding falls down a little.

If anyone is kind enough to help me join some dots that would be brilliant thank you.

Thanks in advance.