Want to add static text just below the post description
Hello,
I have newspaper theme v6.5 installed on my website.
URL – http://www.naukrinama.com
I wanted to put a static social media sharing options and whatsapp sharing link below each of my posts automatically. I figured out that I need to make changes to loop-single.php file.
I have placed my code below the line which calls the function get_content() and it displays it at the position as shown in the screenshot below. I want my data to come exactly after the post description. Currently it is coming below the social icons and advertisement.
With further research i found that i have to make changes to the file where get_content() function is defined in theme. Can you please let me know where can i edit it, or how can i achieve the desired result as shown in the screenshot below.
Staging Implementation URL – http://hackaholicit.com/naukrinama/upsc-released-senior-public-prosecutor-seniority-list-cbi-results-1/
Screenshot – http://imgur.com/iNpfkrE
Hello,
If you want to place your sharing icons inside the content you will have to modify a different file. The content is created here: http://screencast.com/t/yQxaN78B. A you stated above, you will have to tie your code to the function (function get_content() {}) in order to get it working. You will see comments in the file so you know which part of the page is being generated by the code.
I hope this helps.
Thank you.
Hello Bogdan,
Thanks for you previous revert ! I just had another query :
What should I do in case if i want to just show this text (piece of code) to just the mobile/tablet user and not the desktop users.
How can I identify the user-agent of the visitor and then show the text accordingly.
Please reply !
Hello,
if you managed to insert the desired text/code and it works on your desktop version, then you can use css to hide it on desktop and only display it on mobile/tablet. For this you will need to edit the code a bit and add a css class to it so it can be targeted. Then you can use css like so:
@media (min-width:1140px){
.customclass{
display:none
}
}
This will hide your code for the desktop version of your website.
I hope this helps.
Thank you!
Hello Bogdan,
I was trying to add this code in the get_content function in the td_module_single_base.php file. But i am not understanding where exactly to add it so that it comes just below the main post description.
Click Here to Share This on
: <?php the_permalink(); ?>" data-action="share/whatsapp/share" alt="<?php the_permalink(); ?>" style="">Whatsapp
</br>
<p> </p>
</br>
: <?php the_permalink(); ?>" data-action="share/whatsapp/share" alt="<?php the_permalink(); ?>" style="">Whatsapp
&url=<?php the_permalink(); ?>&via=naukrinamajobs">Twitter
Please let me know how can it be done exactly in the file.
Hello rishab55555,
If you want to display the code in the desired area, you have to concatenate the code to the content and insert it like in this screenshot -> http://screencast.com/t/3CoDt1Nt3x7Q -> http://screencast.com/t/LyEhJV5tSH
Please noticed that is not a simple task and if you’re not aware of the steps you need to take in this regard please consider hiring a developer or a freelancer to do this for you because we cannot provide custom work for the moment, sorry.
Than you for the message!
