Hello guys,
Maybe someone can help me with this small peace of code
I have this code:
If I don't have anything in my "twitter" field, doesnt appear nothing.
If I have something in my "twitter" field appears this code:
Everything is working fine here, but I like to ask if is possible to integrate the html code in the first line of php above
The idea is to show twitter url using the first php code and replace the # in the href with the twitter url.
I know that can be difficult to understand what I want lol, but if you have trouble understanding or if you have any doubt, please let me know and I will try to explain with another words.
Hope someone can help me, thank you guys
Maybe someone can help me with this small peace of code
I have this code:
PHP:
<?php echo get_field( "twitter",$modelID); ?>
If I don't have anything in my "twitter" field, doesnt appear nothing.
If I have something in my "twitter" field appears this code:
Code:
<a href="#" target="_blank"><img src="http://mydomain.com/wp-content/uploads/2016/01/twitter-24.png" alt="Official Twitter" title="Official Twitter"></a>
Everything is working fine here, but I like to ask if is possible to integrate the html code in the first line of php above
The idea is to show twitter url using the first php code and replace the # in the href with the twitter url.
I know that can be difficult to understand what I want lol, but if you have trouble understanding or if you have any doubt, please let me know and I will try to explain with another words.
Hope someone can help me, thank you guys