Advanced Custom Fields – Get value in other plugin file [closed]
Per ACF documentation, if you’re not getting values from posts, you need to prepend the ID. For users that needs to be user_ $id = …; get_field(‘wooncheck’, ‘user_’ . $id);
Per ACF documentation, if you’re not getting values from posts, you need to prepend the ID. For users that needs to be user_ $id = …; get_field(‘wooncheck’, ‘user_’ . $id);
You don’t need much code for it. just goto contact form > select contact form > additional setting, paste below code. document.addEventListener( ‘wpcf7mailsent’, function( event ) { location = ‘YOUR_PDF_URL’;}, false );
Use get_post_status to check the status of a post. if( get_post_status( $holiday->ID ) == ‘publish’ ){ echo ‘This is a published post’; } Also note that your use of setup_postdata is incorrect here. It is required to pass the global $post var to the function, otherwise any template function that relies on the global $post … Read more
Yes, if you want to keep using a WP nav menu, a walker is the right way to go. To only affect a certain level (i.e. children, grandchildren, parent, etc.) you can use $depth. class wpseWalker extends Walker_Nav_Menu { public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) { // Check … Read more
You shouldn’t rely on the global $post variable for filters like this. In your example you’re passing $event_city->ID to get_the_permalink(). This implies that the $event_city post is not for the same post as the current $post object. This is normal. Sometimes you want to use a function like get_the_title() or get_the_permalink() without changing the global … Read more
The ACF Repeater plugin as an additional component for the core ACF plugin was never free. The main difference is that before the ACF Pro version, those additional types of fields had to be purchased separately. Now they are all included in the ACF Pro version. More info from the Docs.
You can create a shortcode and add it in any page you want. This code will register your custom shortcode: add_action( ‘init’, ‘register_custom_shortcodes’ ); function register_custom_shortcodes(){ add_shortcode( ‘my-custom-shortcode’, ‘display_movies’ ); } This code will be responsible for the content that will be displayed wherever you place the shortcode: function display_movies(){ ob_start(); //Your code here to … Read more
As I pointed in the comments, if for example you’re displaying 9 posts per page, which means there would be 3 gallery images shown per page, and you want page #1 to show images 1-3, page #2 to show images 4-6, and so on, then you would want to paginate the gallery images: // the … Read more
Its because the wrapper around that text block is set to display: flex;. You could override this by adding the following CSS… .special-list .right-text { display: block; } You can add this in Admin > Appearance > Customize > Additional CSS You might want to add this and then test other pages that use this … Read more
the_title doesn’t work that way: the_title( $before, $after, $echo ); $before is the text that comes before the title, but you didn’t give it a string/text, you gave it a post object. Post objects aren’t strings, PHP doesn’t know what to do so it stops and prints an error instead. For the_title to work, you … Read more