People who code: we want your input. Take the Survey

New answers tagged

0

I would suggest putting the two buttons in a wrapper with display:flex. On desktop set the flex-direction to row and on mobile set it to column. <div class="flex-wrapper"> <a class="btn" href="#">Button 1</a> <a class="btn" href="#">Button 2</a> </div> And then the ...


0

This one works for me. The answer found in this link on the second last post/comment: https://wordpress.org/support/topic/wp-nav-menu-dissapears-in-category-pages-1/?replies=15#post-1859168 Just need to add this on the theme's function.php file add_filter('pre_get_posts', 'query_post_type'); function query_post_type($query) { if(is_category() || is_tag()) {...


1

You can pass an array of attributes with aria_label attribute in it. Try this: get_search_form(array('aria_label' => 'search-form')); This function gets a form from searchform.php by default and if you have this file in your theme and aria-label still missing, you need to check the code in this file. Sometimes developers do not include an option to set ...


0

I happens to me all the time css not updating! if not css error! normally is the browser. Maybe cleaning the browser cache?! in most browsers ctrl + shift + del.


0

There are two ways to get the post/page title for WordPress. get_the_title(); and the_title(); How to use get_the_title(); <h1 class="entry-header text-primary fst-italic"><?php echo esc_html( get_the_title() ); ?></h1> How to use the_title(); the_title('<h1 class="entry-title text-primary fst-italic">', '</h1&...


1

I have solution to add class to anchor tag. 1: Step: add this in functions.php function add_additional_class_on_a($classes, $item, $args) { if (isset($args->add_a_class)) { $classes['class'] = $args->add_a_class; } return $classes; } add_filter('nav_menu_link_attributes', 'add_additional_class_on_a', 1, 3); 2: Then use it like ...


0

Thanks to @Tunji's answer, I accomplished this with a more generic function: /** * Use output buffering to convert a function that echoes * to a return string instead */ function echo_to_string( $function ) { ob_start(); call_user_func( $function ); $html = ob_get_contents(); ob_end_clean(); return $html; } Then it can be ...


0

Once you created custom size for image you need to regenerate that featured image with plugin if multiple and if only one then remove that image and upload again, so you got cropped image into front.


0

Also you can not use year as the name of the field.


Top 50 recent answers are included