
PHP small tips
WordPress PHP
Shortcode into PHP
Excellent bit of information here for converting a Worpress shortcode into php to place into a template:
From Chris Coyier. Where [shortcode] is your shortcode…
Note:If the shortcode contains double quotes (“) these will need to be single quotes inside the php.
contact-form-7 id="929" title="Changes form"
Change to:
contact-form-7 id='929' title='Changes form'
Or like this:
Edit Post Links
To get the FP edit button to appear, only when logged in, on content blocks place this before the content shortcode int he PHP template. The Content box id needs to be places manually if outside of the loop.
$link – string… $id – integer
Adapted to look like:
Pull in content
To get the content into your page add this piece of php:
Done.
Fivepilchard Team