Skip to main content
Bumped by Community user
Bumped by Community user
added 253 characters in body
Source Link
metalzade
  • 117
  • 1
  • 2
  • 5

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the Blog(Blog Page)?

I should say that I want to use this ID to get the meta box value of the blog page in single.php.

The same goes for a custom post type, let's say 'project', Where a page template list the project's posts (Projects Page) and single-project.php for the single project post. in this case I want to get the (Projects Page) ID in single-project.php.

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the Blog Page?

I should say that I want to use this ID to get the meta box value of the blog page in single.php.

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the (Blog Page)?

I should say that I want to use this ID to get the meta box value of the blog page in single.php.

The same goes for a custom post type, let's say 'project', Where a page template list the project's posts (Projects Page) and single-project.php for the single project post. in this case I want to get the (Projects Page) ID in single-project.php.

Tweeted twitter.com/#!/StackWordPress/status/327331079268753408
added 101 characters in body
Source Link
metalzade
  • 117
  • 1
  • 2
  • 5

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the Blog Page?

I should say that I want to use this ID to get the meta box value of the blog page in single.php.

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the Blog Page?

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the Blog Page?

I should say that I want to use this ID to get the meta box value of the blog page in single.php.

Source Link
metalzade
  • 117
  • 1
  • 2
  • 5

How to get the post's parent ID?

I have a template which outputs the blog posts (Blog Page), I open one of the posts which use single.php template, Now how can I get the ID of it's parent which is the Blog Page?