Add custom field to the archive page?

Using the Advanced Custom Fields plugin you can assign options pages to you custom posttype like this: if( function_exists(‘acf_add_options_page’) ) { acf_add_options_page(array( ‘page_title’ => ‘YOUR_PAGE_TILE Options’, ‘menu_title’ => ‘YOUR_MENU_TITLE Options’, ‘menu_slug’ => ‘options_YOUR_SLUG’, ‘capability’ => ‘edit_posts’, ‘parent_slug’ => ‘edit.php?post_type=YOUR_CUSTOM_POSTTYPE_SLUG’, ‘position’ => false, ‘icon_url’ => ‘dashicons-images-alt2’, ‘redirect’ => false, )); } That way you get an … Read more

Display List Of Posts Containing a Relationship Field Value [ACF]

I am updating my complete answer based on your clarification in the comment below. I hope this helps: <div class=”entry-content”> <h2>Documents written by this writer</h2> <?php /* * Query posts for a relationship value. * This method uses the meta_query LIKE to match the string “123” to the database value a:1:{i:0;s:3:”123″;} (serialized array) */ $documents … Read more

ACF – get fields from group

Thank you so much for your post, I spent half day to figure out how to get field names by their group. If you have field names, you can easily get their values: get_field($field[‘name’]); EXAMPLE HOW TO GET IMAGES FOR SLIDER <?php //or insert the ID of your fields Group. $groupID=’116′; $custom_field_keys = get_post_custom_keys($groupID); foreach … Read more

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