How do I display specific custom posts, and how do I edit a post’s singular page?

Custom post types don’t need a template created for them. They will automatically use the archive.php and single.php of your theme. If you want to customize a page so that your portfolio and your regular blogs are different then you need to create 2 files. archive-postname.php (in this case it’s whatever you named your post … Read more

Use ACF array values in shortcode

$atts[‘form_id’] contains the form_id that was passed with the Shortcode. You are searching for this form_id among the data that is held in the forms field. $forms is an array, and each item in the array is another array with your two keys: form_id and form_markup. So, for each item in $forms, you want to … Read more

WordPress page not showing up – replaced with last 10 posts?

The problem is with the rewrite rules generated with the post type- they’re a bit greedy and are capturing those requests. WordPress is trying to query for a matching category_type, which isn’t actually an object type, and in the absence of any other valid query argument, it runs the main blog query. You could manually … Read more

plugin_dir_url(__FILE__) searches parent theme in ACF extension

I’m a total dummy. Looked through the field file and found this: function input_admin_enqueue_scripts() { // Note: This function can be removed if not used // register acf scripts wp_register_script(‘acf-input-column’, $this->settings[‘dir’] . ‘js/input.js’, array(‘acf-input’), $this->settings[‘version’]); wp_register_style(‘acf-input-column’, $this->settings[‘dir’] . ‘css/input.css’, array(‘acf-input’), $this->settings[‘version’]); // scripts wp_enqueue_script(array( ‘acf-input-column’, )); // styles wp_enqueue_style(array( ‘acf-input-column’, )); } $settings->[‘dir’] was set … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)