I’m using a wordpress plugin to display real estate data. I need to display a certain snippet of code in the wordpress footer when a certain value is found in the db. Specifics. I already have the footer code displaying using the following function:

// Adds Tucson Association of Realtors required board html to wp_footer()    
dynamically.
function wwidx_footer_script() { ?>
<div class="aztarfooter" style="text-align:center;">©2016 Tucson Association of Realtors. All rights reserved. All information deemed reliable, but Not Guaranteed. IDX information is provided exclusively for consumers' personal, non-commercial use and may not be used for any purpose other than to identify prospective properties consumers may be interested in purchasing.<br> <br><img src="https://www.weeboweb.com/wp-content/uploads/2016/10/tarlogo.gif"><br><img src="https://www.weeboweb.com/wp-content/uploads/2017/05/EHO-logo-e1494994377845.jpeg"> <img src="https://www.weeboweb.com/wp-content/uploads/2017/05/MLS_Clear-1-e1494994488609.jpg"></div>
<?php }
add_action( 'wp_footer', 'wwidx_footer_script' );

This function displays the code exactly where and almost how I want. The problem is that I need to make it dynamic. In my db, there is a table called wp_realty_controlpanel. In that table, there is a field called controlpanel_masterdb_user. When the value in that table is “wwidx_az_tar” I want the code to display, otherwise not. You can see the snippet exactly where I want it here http://demo.weeboweb.com/. Any help is appreciated.

Read more here: Display code dynamically in wp footer based on value in db


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: