Hi there,
Thank you for the kind words.
I’m not sure how to help you. Every theme is different. What are you trying to accomplish?
Maybe you can use conditional tags in your functions.php
https://codex.wordpress.org/Conditional_Tags
Check it out and let me know.
Regards
Thank you for your quick notice. Conditional tags may be something I’m looking for, however not sure how to use them even tho I read the tutorial :D. Maybe I can use the
in_category( array( 1,2,3 ) )
but not sure how.
My goal is to make the buttons appear only on posts. At the moment it also displays on the page. For example if you go to the front page http://www.ajuvaba.ee then you can see that each post have the buttons, which is great, but by default it puts the button at the very bottom of page as well. However I’ve disabled it with css on my home page with this code
#thumbs-rating-xxxxx {
display: none !important;
}
so you cannot really see the button at the bottom of the page.
Basically:
When creating new page I’ve to hide the button at the bottom of page manually with css. So I figured its better to learn and put the right code at the right place so when creating a new page then the page itself doesnt have the buttons. Only posts and single posts.
Sorry for making this post so long
Ok so maybe you can try the following:
Let’s try not a page !is_page()
function thumbs_rating_print($content)
{
if ( !is_page() ){
return $content.thumbs_rating_getlink();
}else{
return $content;
}
}
add_filter('the_content', 'thumbs_rating_print');
You could also use is_single()
function thumbs_rating_print($content)
{
if ( is_single() ){
return $content.thumbs_rating_getlink();
}else{
return $content;
}
}
add_filter('the_content', 'thumbs_rating_print');
Good luck !
Both of them seperately breaks the theme :S.
Maybe I could use this somehow? <?=function_exists('thumbs_rating_getlink') ? thumbs_rating_getlink() : ''?>
No, just everything is upside-down basically
Maybe want login credientals to check it out ?
No, no please 🙂
I don’t understand. What do you mean upside-down? A white screen?
I cannot understand what’s wrong with the code, the conditional tags work that way.
You’re replacing your code with the one I’ve pasted you, right? Make sure you don’t have it twice, duplicated.
When I enter the code like this: http://prntscr.com/7g18mk
then it will show up in front end like this: http://prntscr.com/7g18il
And same way with is_single()
Honestly, I don’t understand.
Generally I would not recommend you editing the theme files directly in WordPress admin. Use FTP and a proper editor.
I’m afraid not I can help you any further 🙁
I tried to edit with dreamweaver cs6 as well and uploaded via ftp. Same results 🙁
Sad that there will be no further help :/
It’s not that I don’t want to help, I just don’t know how.