consider to use:
$postspage_id = get_option('page_for_posts');
and then change the rspective line in your code to:
$leftSidebar = get_post_meta( $postspage_id, '_my_meta', true );
from: http://www.blog.highub.com/cms/wordpress/wordpress-front-page-posts-page-id/
Related Posts:
- Get previously visited page ID
- Get ID of “root-page”
- Get the correct post id for all post and page in header.php
- Get users between user ids
- ID of Front-Page
- Always Encounter Using ID in WordPress as a Final Solution [closed]
- Why does the page/post ID keep growing when i refresh the post-new.php file?
- How can I exclude a specific ID from this line of code?
- get page id’s – not get pages?
- get post by nav id
- Ad units Div-ids frequently changing
- Consequence of the post auto incrementer off?
- Subcategory IDs in relation to parent category ID switch case
- add anchor tags rel to thumbnails id
- get_pages gives wrong ID for blogpage
- Get page ID of page that is set as the posts page
- How to get current page ID outside the loop?
- how to get page id of a page using page slug
- Check if current page is the Blog Page
- get post author id outside loop
- How to get Author ID outside the loop
- Custom Walker: how to get ID in function start_lvl
- How to get page title with the page ID?
- How to get permalink and title from post ID?
- How do I get the current edit page ID in the admin?
- Echo author ID in author.php
- Get page IDs from nav items
- Creating custom blog page template the right way
- How to get home page ID?
- Show Default Editor on Blog Page ( Administration Panel )
- Are post ID’s reliable?
- Get current post id in functions.php
- get all posts ID from a category
- How to obtain the user ID of the current profile being edited in WP-Admin?
- Creating a WordPress admin page without a menu for a plugin
- What is an alternative to get_page_by_title()?
- Settings API – creating reusable form elements?
- Get the current post ID as a variable in Javascript
- Is post ID number always incremental n+
- Can’t get post ID in functions.php?
- I put my blog on a subpage, how do I get page title?
- Get page id by title?
- What is archive.php used for?
- How to add the category ID to admin page
- Post ID At The End Of Permalink URL Effects Performance (Positively)?
- Importing posts from old website to new conflicting post ID’s?
- Display content from a specific category
- Get All IDs Of A Post Type Using WP_Query
- Get user id from email?
- How to change WordPress user ID?
- How to get page’s ID if I know the title only?
- Blog.php or how to display recent posts?
- Getting the ID of a meta box
- Is there an equivalent of the PHP function sanitize_key in Gutenberg?
- Are all ID’s used unique?
- Non existing blog pages are not redirected to 404
- Permalink: postname EXCEPT for blog
- get all page IDs from wp_list_pages
- $post->ID displays wrong ID
- Custom fields won’t display on my blog page
- Exclude category on blog list page
- Add category to custom post type automatically, using category slug
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- index.php template is used instead of blog page
- How to get any tag ID
- get_post_meta fields don’t show up on posts page
- Possible to create a new post and have the Title and Slug automatically use the post’s ID?
- How to change the permalink structure of a master page?
- How to change the link structure of the homepage?
- Show ids of displayed media library items
- How to query ‘posts_per_page’ to display a different blog posts index template?
- How to get the list of posts in a static page other than front page?
- How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
- Showing random content / pictures from earlier posts in a sticky post?
- On Category page, How can I get the category ID?
- Get the post_id of a new post
- Get the comment author ID by the comment ID
- Why aren’t my posts showing?
- How to get ID of images used in gallery?
- get post id in while loops outputting page id
- is_page(id) not working for blog page
- How can I display a specific user’s first published post?
- get the_title_attribute by id
- Are Post IDs Unique Across all Post Types?
- How can I have a static title on my blog page?
- Undefined variable post_id in custom quick edit coloumn
- Creating a Front-end based User Search
- Exclude main blog from get_blogs_of_user
- How to display blog posts on a dedicated page?
- How can I show the actual content of Posts page because the_content() is showing all blog content?
- How to display only the excerpt in the blog/posts page with Gutenberg?
- When using global $post in blog index file (home.php) it returns the latest blog post instead of current page
- How to display on the blog page the posts corresponding to the selected language, using Polylang
- Custom Theme Blog page not showing Posts
- Does the menu item ID ever change?
- Get a post_id where meta_value equals something in a serialized meta_value field
- Return number of items in a table with post id
- How to get user_id from wordpress database inside ajax function?
- Get comment content by comment ID
- Get author ID with attachment ID