Support

Account

Home Forums General Issues ACF and exec php do not work

Solving

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

  • Hello elliot, thanks for the replay it’s give Blank page

  • 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

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘ACF and exec php do not work’ is closed to new replies.