Return ACF Field value function
Return ACF Field value function
Return ACF Field value function
Assuming you want to show the terms of just one taxonomy at a time, then this will produce what you’re looking for: function my_theme_get_child_terms(){ $return = ”; $current_term = get_queried_object()->term_id; $term_info = get_term($current_term); $sub_categories = get_term_children( $current_term, $term_info->taxonomy ); $return .= ‘<h2>’ . $term_info->taxonomy . ‘</h2><ul>’; foreach ( $sub_categories as $cat ) { $term = … Read more
I’m not familiar with how FacetWP displays search results, but if it’s using the default (or a custom) search.php template, you could use a template filter to hijack the default hierarchy. See the Filter Hierarchy section of the Template Hierarchy page for examples. If you want more specific help update your question to show how … Read more
You’ll want to checkout the registration_errors filter. Make sure the role is being posted within the particular registration form. Instead of conditionally adding your action you have to check within the filter if role and email are valid. add_action( ‘registration_errors’, ‘wpse_248123_registration_errors’ ); function wpse_248123_registration_errors( $sanitized_user_login, $user_email, $errors ) { if ( empty( $_POST[‘role’] ) ) … Read more
You could either add the span in your template file like this: <h1><span><?php the_title() ?></span></h1> Or you could add a filter to manipulate the output like this: add_filter(‘the_title’, function ($title) { $title=”<span>” . $title . ‘</span>’; return $title; });
<div class=”table-cell”> <?php if ( has_custom_header() ) : ?> <?php the_custom_header_markup() ?> <?php else : ?> <h1 class=”blog-title”><?php bloginfo(‘name’); ?></h1> <h5 class=”blog-tagline”><?php bloginfo(‘description’); ?></h5> <div class=”image-title”><img src=”https://wordpress.stackexchange.com/questions/248807/<?php bloginfo(“template_url’); ?>/images/image.png” /></div> <?php endif ?> </div>
I need to do the next step: To redirect my logout, I put the next code in functions.php function out_home(){ wp_redirect(home_url()); exit(); } add_action(“wp_logout”,”out_home”); In my header.php, to change the value of my URL in the login: $URL_POSTLOGIN = add_query_arg(array(),$wp->request); function login_go_home($URL_POSTLOGIN){ wp_redirect($URL_POSTLOGIN); exit(); } add_action(“wp_login”,”login_go_home”); Maybe is not the best solution but in my … Read more
Use the function wp_reset_postdata() after looping posts.I think this will solve your problem … Note : if you use setup_postdata() you do need to wp_reset_postdata() afterwards.
Well, once I got debugging working, I was able to figure out how this nav_menu_css_class filter works. First, I parse the url off of the nav item. Then I use that to compare against the post’s category array. If I find a match, I set the $classes[] array, and I’m good to go. I know … Read more
Ok, I found the correct format for this TinyMCE issue which also retain some of the original Style Format selections. Enjoy! function my_wpeditor_buttons( $buttons, $editor_id ) { if ( ‘content’ != $editor_id ) { return $buttons; } array_unshift( $buttons, ‘styleselect’ ); return $buttons; } add_filter( ‘mce_buttons_2’, ‘my_wpeditor_buttons’, 10, 2 ); function my_wpeditor_formats_options( $settings ) { … Read more