Tag Info

New answers tagged

0

Ok, I finally read many articles and finally I got everything right. So here is the solution now for other people if they get caught up in same situation. <article id="" class="page type-page status-publish hentry"> <header class="entry-header"> <h1 class="entry-title">Check Application Status</h1> ...


-1

For some reason, the problem worked itself out...


0

One option is to fetch all of the posts to a single array and filter that array 50 ways. This would only generate the one query: $posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => 'school' )); To filter your array you would do something like this: $this_state = "Texas"; $state_posts = array_filter($posts, ...


0

I played with the code for a bit longer and managed to get it working. Answer below add_filter( 'gform_pre_render', 'freetrial_studios' ); add_filter( 'gform_pre_validation', 'freetrial_studios' ); add_filter( 'gform_pre_submission_filter', 'freetrial_studios' ); add_filter( 'gform_admin_pre_render', 'freetrial_studios' ); function freetrial_studios( $form ...


0

I would advise using the built-in functions ACF functions for this. Elliot has provided a full toolbox for you and documentation for all field types: <?php // Conditional statement (Single Value) if(get_field('page_layout') == "col_1") { //... } //Conditional statement (Multiple Values) if( in_array( 'col_1', get_field('page_layout') ) ) { ...


0

Reading the docs (never used flexible fields, only repeater fields, but look the same): <?php // check if the flexible content field has rows of data if( have_rows('flexible_content_field_name') ): // loop through the rows of data while ( have_rows('flexible_content_field_name') ) : the_row(); if( get_row_layout() == 'paragraph' ): ...


2

Lets break this down, Advanced Custom Fields (ACF) does save the data as custom field/post meta, I guess it seems all to obvious, but it is better to confirm it, and ElasticPress does set up custom fields automatically to include them into the search index. ElasticPress does this unless the meta data is hidden, which is the case if the custom field name is ...


0

You should look at archives.php. What you trying to do is create a custom post type loop ("pages) in different sections of your template. You have to filter by category, taxonomy, or tags to set up your different groupings. http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/ ...


1

ACF has some actions and filter, one of the actions you should check is acf/render_field. It runs to render a field input. You can hook into this action and modify your input to be read-only or even completely replace the input with its value. Another option is to set up location rule: User role - is equal to - Administrator. This will show the edit form ...


0

All I can think is to process the posts at an earlier stage with a Core hook. This is crude, of course, but: function hack_the_post($posts) { foreach ($posts as $p) { $p->post_content .= ' I added this'; } return $posts; } add_action('the_posts', 'hack_the_post'); It is a bit energy intensive but so long as your plugin/theme uses more or less ...


0

Might be a stupid question, but have you tried creating the Custom Taxonomies using the GUI via the plugin? I only ask because I recently had problems creating custom taxonomies for a restaurant website via php functions. I could only get it to work if I used the GUI.


0

If I compare the counter to five instead of the input (****), then it evaluates perfectly. Thanks to Milo for the help. <?php if( have_rows('program_skills') ) : while( have_rows('program_skills') ) : the_row(); ?> <div class="skills-wrapper"> <div class="col-xs-6"> <p><?php ...


0

You coudld just use $housePhotos = get_post_meta( $post->ID, 'house_photos', true ) to get an array of the image id's. Then you could get the first image by saying $imageURL = wp_get_attachment_image_src( $housePhotos[0], 'house_search' );


0

The trick is to call the hook "wp_insert_post". But the post-type is not what you expect - post, page oder custom post type. It's "revision". Now you can fire a WP_Query right after the post is saved in the database.


0

The Date & time utilities utilize a detachment of date & time patterns. The date () utility revisits the date in this pattern: ‘YYYY-MM-DD’. SQL Date functions oracle



Top 50 recent answers are included