4
votes
Accepted
Make PHP work with HTML tags
From your code the proper structure would be
if ( is_singular() ) {
if (get_post_meta(get_the_ID(), 'square_image', true)) {
echo '<img src="' . get_post_meta($post->ID, '...
2
votes
Accepted
Finding the screen id of a page generated with add_menu_page
The function add_menu_page return the hook suffix that inform you about the current page.
A simple example to get the hook suffix.
public function add_menu_page() {
$page_hook_suffix = ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
php × 9990functions × 1589
plugins × 1131
plugin-development × 689
woocommerce-offtopic × 544
javascript × 485
custom-post-types × 483
ajax × 469
theme-development × 418
loop × 402
posts × 396
customization × 394
wp-query × 381
jquery × 377
html × 365
shortcode × 356
mysql × 353
categories × 307
css × 307
custom-field × 269
database × 246
menus × 215
filters × 211
themes × 210
array × 203