SQL Query Search page

you can use WP_Query(); to query the results. it has an argument ‘s’ => $search_query, create an input, get the input value, store it in $search_query, then create a query, $query = new WP_Query( array( ‘post_type’ => ‘post’, ‘s’ => $search_query ) ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); // … Read more

How to fix the loop statement

Perhaps just being sure that you set your image data within what WordPress calls “the loop” (aka inside that while where $post is set so that get_the_ID returns the info for the post currently being looped over) will get you running. Here is one idea how you might accomplish that: <?php if (have_posts()) : while(have_posts()) … Read more

Add Alt attribute to image served with php

just add it in… <div class=”bd-layoutcolumn-20 bd-column” ><div class=”bd-vertical-align-wrapper”> <img alt =”my alt tag” class=”bd-imagelink-3 bd-imagestyles ” src=”https://wordpress.stackexchange.com/questions/244847/<?php echo theme_get_image_path (“images/b56392d722ada5890c6d2f29f1dbde4a_logo.jpg’); ?>”> if you’re going to make it dynamic you’ll need to add the php. Something like this if you’re in a loop: <div class=”bd-layoutcolumn-20 bd-column” ><div class=”bd-vertical-align-wrapper”> <img alt =”<?php echo get_the_title();?>” class=”bd-imagelink-3 bd-imagestyles … Read more

How to hide the Duplicate taxonomy values in WordPress?

I did not test the code. But this should be work. <div id=”footer”> <h1>Area Names </h1> <?php $taxonomyArray = array(“health_area”,”schools_area”,”office_area”,”salonsandsaps_area”); $temp_array=array(); for($Inc=0;$Inc<count($taxonomyArray);$Inc++){ $orderby = ‘name’; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // 1 for yes, 0 for no … Read more