How to get the post-ID in my plugin?
I am trying to write a little plugin which allows me to add a different theme to each page. well.. still trying.. 😉
When I put
return 'mytesttheme'; at the end it works just perfect!
when I add an ID (
$page_theme = get_post_meta('66', [...]) it also works..
when I write
echo $page_theme.', '; before the return, it outputs:
, , , mytesttheme, mytesttheme, mytesttheme, mytesttheme,
The empty spaces are the problem I think.
in wp-backend it shows “mytesttheme” as post meta content in wp-core post meta content box.. so the saving works as it should..
Any ideas how to solve the problem? :S