Home › Forums › General Issues › ACF and exec php do not work
Hello,
as you read from title, i want to run(exec php) inside the page post using exec php will it’s run but when it come to get the ACF here do not work
if anyone can help thanks
Hi @5vlast
Can you please elaborate on what you mean by ‘do not work’?
Attach some screenshots to demonstrate the backend.
What code are you using in your template?
Are you able to debug the problem via code?
Thanks
E
Elliot thanks for the replay
here what i am trying to run
<?php query_posts( ‘cat=45&showposts=1’ );
// The Loop
while ( have_posts() ) : the_post(); ?>
<div class=”mrimg”>” height=”185″ width=”185″ alt=”Последняя работа”></div>
<div class=”mrname”>” title=”<?php the_field(‘sitename’); ?>” > <?php the_field(‘companyname’); ?> </div>
</div>
</div>
<?php endwhile;
// Reset Query
wp_reset_query();
?>
Hi @5vlast
Thanks for posting the code, but can you please address the other questions I previously asked?
Thanks
E
Hi @5vlast
A ‘blank page’ or ‘white screen’ represents a PHP error in code which will shut down the page load.
Please turn on DEBUG MODE in your wp-config.php file and refresh the page and report back with your PHP error
Thanks
E
Elliot thanks,
yes it’s go white screen only in the Post container where the code been added before but the rest of the page it’s load
here what i get in debug mode `Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/div/wp-includes/functions.php on line 2919 Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/div/wp-includes/functions.php on line 2919 Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/div/wp-includes/functions.php on line 2919 Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/div/wp-includes/functions.php on line 2919 Notice: Undefined variable: footer_theme_name in /var/www/div/wp-content/themes/designfolio/api/classes/theme_options.php on line 198 Notice: Undefined index: ws_plugin__qcache_menu_pages_css in /var/www/div/wp-content/plugins/quick-cache/includes/classes/admin-css-js.inc.php on line 20 Notice: Undefined index: ws_plugin__qcache_menu_pages_js in /var/www/div/wp-content/plugins/quick-cache/includes/classes/admin-css-js.inc.php on line 28 Notice: Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ load_plugin_textdomain вызвана Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼, который ÑчитаетÑÑ ÑƒÑтаревшим Ñ Ð²ÐµÑ€Ñии 2.7. Ðльтернативы не предуÑмотрено. in /var/www/div/wp-includes/functions.php on line 3019
and
Notice: Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ wpdb::escape Ñ Ð²ÐµÑ€Ñии 3.6 ÑчитаетÑÑ ÑƒÑтаревшей! ИÑпользуйте wpdb::prepare() or esc_sql(). in /var/www/div/wp-includes/functions.php on line 2919
`
Hi @5vlast
Looks like you have quite a few PHP errors on the page. Can you please debug and fix your theme / plugins to fix these errors.
ACF should then continue to work as expected.
Thanks
E
The topic ‘ACF and exec php do not work’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.