ACF get post Id?
ACF get post Id?
ACF get post Id?
Alright, I came across another answer that’s finally solved this. I had a function (in functions.php) which revoked admin access to some user types I’d created with custom privileges – that was blocking non-admin access to admin-ajax.php. Old/new function below: Old function // Revoke dashboard access add_action(‘admin_init’, ‘restrict_access_admin_panel’); function restrict_access_admin_panel(){ global $current_user; get_currentuserinfo(); if ($current_user->user_level … Read more
The problem is that $user_id = bbp_get_topic_author_id( $topic_id = 0 ) is malformed. You need to remove the = 0 from $topic_id = 0 and make sure that the variable $topic_id actually contains the ID of the topic you are trying to get the author of.
You can’t pass arrays by passing a string with commas into array(), that’s not how arrays work in PHP. Your code is the equivalent of: if ( in_category( array( ‘1,2,3,4’ ) ) ) { } Which is checking for a single category with the ID ‘1,2,3,4’, which can’t exist. For what you want to do, … Read more
Showing different js file for different theme in wordpress customizer api
Your class has no __construct() method. Even if it did, you’re not calling the class to set it up So… 1) at the top of your class, add: function __construct() { register_cpt(); } 2) after your class, add: $myCPT = new Dw_Mf_Register_CPT(); Or, you could just get rid of the class construction altogether. You don’t … Read more
I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
I’ve found that there are two causes for this error when developing with the settings API: you are not running under the ‘admin_menu’ hook some other error has occurred, check the error log. Both of these derive from current_user not being available at the time.
I would recommend this plugin to add titles and content list with links
since the last time I used WP Bakery, shortcodes were not rendered in the back end (unlike with elementor for example). If it also shows it like this in the front end, then you need to make sure that you selected the ‘text’ tab and not ‘visual’ for the text-block you added the shortcode to … Read more