custom theme’s search not working

See the Codex page for Template Heirarchy – https://codex.wordpress.org/Template_Hierarchy#Search_Result_display Based on the links you provided, I’d guess the error stems from using a “static” index page. If your index.php file doesn’t contain a loop to iterate through posts, it won’t display any search results. You can retain a “static” index if you create a search.php … Read more

How can I add meta tags in the WordPress header?

Since you are you using Yoast WordPress SEO plugin you can utilize its hook action wpseo_opengraph to add your custom meta tag property. Add the following code to your theme functions.php file: function wpse213_article_tag(){ global $post; if($post->post_type == ‘post’) { if($tags = get_the_tags($post->ID)) { foreach($tags as $tag) { echo ‘<meta property=”article:tag” content=”‘ . esc_attr($tag->name) . … Read more

buddypress slug issues [closed]

I know this is not the correct way and you should always edit the template but i just edited the core buddy press navigation function. You will see below the google link I added. function bp_get_displayed_user_nav() { global $bp; foreach ( (array) $bp->bp_nav as $user_nav_item ) { if ( empty( $user_nav_item[‘show_for_displayed_user’] ) && !bp_is_my_profile() ) … Read more

Button not working?

there is a major problems in your code : 1- you must use the <form> when you want to submit the data whatever the system you use (wordpress, EE ,php ,html …). 2- if you want to check if the page submitted or just visited without submitted, you must change your condition to : if(!empty($_POST)){ … Read more

AJAX in wordpress theme loop

You need to set user logged in condition on button/ link which triggers ajax request, eg, if user is not logged in open login modal else your function.

Custom walker pulldown display current page

WordPress add “current-menu-item” class for the active menu item, you could check if this class is set and the set the option for that item be selected. class Walker_Nav_Menu_Dropdown extends Walker_Nav_Menu { function start_lvl($output, $depth) { } function end_lvl($output, $depth) { } function start_el($output, $item, $depth, $args) { // Here is where we create each … Read more