php


Get post id in divi module that works in post.php


I'm wroking in a DIVI Module that let you choose a metafield to print in the divi layout.
How can I use the id of the post page to filter the metafields used for it?
I try this:
<?php
class DS_Meta_Fields extends ET_Builder_Module{
....
function get_fields(){
$meta_options = array();
$meta_fields = get_post_meta($post->ID);
foreach($meta_fields as $meta_field => $meta_field_obj) {
$pt_options[$meta_field] = $meta_field_obj->labels->name;
}
....
?>
But I don't obtain the id from the post admin page as shown here.

Related Links

Creating Border in PHP around text
Steps to set the SVN (Subversion) for a folder
PHP MVC / Model understanding
Register not working (Unsuccessful)
Comparing a DateTime object to a DateInterval and subtracting DateInterval from DateTime under certain conditions
Magento - only show current category in url
Dynamic additional composer.json files
Retrieving Parse.com objects with PHP script
Linking to external page and append its HTML within the original page's wrapper automatically
Fatal error: Declaration of EasyBlogTableMediaManager::bind() must be compatible with that of JTableInterface::bind()
Need to change the server address of the image
Page not loading after php include
php function argument FILE type error
Error when embed image in mail using Yii2
Yii 2.0 How to generate form without <div class=“form-group”>?
JSON parsing in PHP of Twitter Stream

Categories

HOME
cocoapods
magento2
keyboard
angular-ui-grid
barcode-scanner
d3.js
couchdb
visual-studio-2010
mathematical-optimization
gallery
fogbugz
tfs2015
firebase-dynamic-links
hspi
stack-overflow
lda
heuristics
cqrs
live-streaming
opam
tableview
conda
batch-rename
rxjs5
perfino
python-appium
hdmi
acrobat
iwebbrowser2
miniprofiler
toad
private-key
shapeless
amazon-kms
django-smart-selects
stat
right-click
grunt-contrib-watch
newtons-method
kitura
linq-to-excel
autorelease
photoswipe
aurelia-fetch-client
google-news
pen
nslayoutconstraint
ipywidgets
pyaudio
svnserve
nvda
tsqlt
perforce-integrate
bbc-micro
gulp-uglify
ioctl
arbre
canopy
gluon-desktop
jnlp
ngcordova
whitespace-language
fuseesb
nssortdescriptor
famo.us
comctl32
rebar
image-rotation
zend-mail
jquery-mobile-flipswitch
webmethod
otl
android-2.3-gingerbread
screwturn
senchatouch-2.4
radius-protocol
ax
html-frames
semicolon
semantic-merge
fitch-proofs
exponent
quartz-core
n-queens
infopath-2007
expression-web
differentiation
radscheduler
qcar-sdk
webresponse
3-tier
iphone-sdk-4.3
zend-test
browser-based
word-automation

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile