Disqus comment form not displayed on self hosted Wordpress site - wordpress

I have followed all instructions on installing Disqus commenting system on my website but the old comment form is still visible.
My question is: is <?php comment_form(); ?> enough to display the comments or there needs to be something else on the single.php page.
What else should I be taking care?
I don't have any other commenting engine installed.
Thank you

OK I found it.
Instead of using the <?php comment_form(); ?> I had to use <?php comments_template(); ?>.
That did the trick

install woody snippets on your site
insert a new php snippet:
comments_template(); ?>
go in widget select custom html and place the code:
<div id="disqus_thread">
[wbcr_php_snippet id="THE ID WHAT WOODY GAVE YOU"]
</div>
and place the widget where you want
obviously don't forget to enable comments site-wide

Related

Wordpress - theme doesn't show newest posts

I have a website with Wordpress and free template Creative on this link: http://kristinauhrinova.com.cluster3s23.dnsserver.eu/
I don't know why, but on bottom of the home page it doesn't show previews of newest added posts like in template demo http://dessign.net/unittheme/
Can you help?
Thanks, Filip.
Looks like there is no loop in the index.php. You may have to write one yourself. To pull the previews if one doesn't already exist. Here's the WP Codex page about The Loop. Hope this helps.
try to add this code on the home page,
<?php the_title(); ?><br />
<?php the_content(); ?>

restrict viewing photos and article content on a wordpress site

I have a question, and i hope i am posting in the right place, if this topic belongs to another forum, please guide me where to post it.
the question is: i have a website created with WordPress and i am using the Jupiter theme, i need to hide some content (like hiding the last half of the article in a page) and disable the photos to be enlarged unless the visitor is a registered user, i need to know how to do that, and if there is a plugin to do that, i have tried "layered-popups-for-wordpress" and "optin-content-locker-layered-popups-addon" but they didn't work properly.
It might request a lot of effort for you to edit the theme on your own...You can use the_excerpt() insetead of the_content() for display info, and add a rule that only registered members can see, something like
if(is_user_logged_in()) {
the_content();
} else {
the_excerpt();
}
Do this while in the loop, of course...
These plugins might help you though
https://wordpress.org/plugins/tags/paid-content
If you're using WPMU might try this one
https://premium.wpmudev.org/project/pay-per-view/
I don't know of a plugin that does this automatically, but you can do it yourself if you are willing/able to do some minor theme development. Make a child theme of your Jupiter theme, and copy over the file content.php. There will probably be some part of the code that looks like this:
<?php if ( is_search() ) : ?>
<?php the_excerpt(); ?>
<?php else : ?>
...
Or something like that. The point is, the theme should already be set up to serve excerpted content for a search. You could either simply add code like this:
<?php if ( is_search() || !is_user_logged_in() ) : ?>
<?php the_excerpt(); ?>
<?php else : ?>
...
Or you could customize what non logged in users are seeing like this:
<?php if ( is_search() ) : ?>
<?php the_excerpt(); ?>
<?php else if (!is_user_logged_in()) : ?>
<!-- Your custom code display here -->
<?php endif; ?>
Hope that's helpful!
In order to hide certain parts of your content with just a simple shortcode you may give "Restrict Anonymous Access" plugin a try:
https://wordpress.org/plugins/restrict-anonymous-access/
Examples:
[member]My restricted content …[/member]
This shortcode can be placed wherever you need to hide something from logged-out users or even users of a certain user role can be addressed:
[member role="author"]My restricted content to users below author role …[/member]

how to add a search box to forum in wordpress

I have configured, wordpress forum. I have created several forums in the site.
Everthing is fine but there is no configuration to search previous form topics.
I use bbPress forum.
I have tried following but didnt see any difference.
<div class="bbp-search-form">
<?php bbp_get_template_part( 'form', 'search'); ?>
</div>
I added above code to content-single-forum.php file
Try below code:
<?php get_search_form(); ?>
Thanks.

Custom Wordpress sidebar not being retrieved

I'm tuning up a website made with Wordpress and I'm facing a small inconvenient:
I want to use a custom template for the posts in a specific category, so I have a single-4.php file that gets me a custom php file for any post in cat.id 4. That works great, now for the problem...
PROBLEM -->
I want to display a custom sidebar as well, so at the end of the single-4.php I add:
<?php get_sidebar( $evento ); ?>
As instructed in the Wordpress Codex, expecting to get my sidebar-evento.php file used istead of the default sidebar.php. But it doesn't work, instead it will just use the default behaviour instead. I have also tried "'single-evento'" instead. I know that the code line is being used because if I remove it, the sidebar area breaks ( dissapears and the page breaks).
My suspicion is that the Custom Sidebars plug-in is catching up right after I call for any sidebar and regardless of which one I'm requesting, it gets replaced. But it doesn't make much sense really. Because as you can see in my sidebar-evento.php:
<div id="right">
<h3>LINE TO CHECK IF SIDEBAR-EVENTO.PHP IS SHOWN</h3>
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
<?php endif; // end sidebar widget area ?>
<?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
<?php endif; // end sidebar widget area ?>
</div></div>
Both things should happen: A) I get my custom text, then B) I get the other custom thingies as determined by the plug-in.
I hope I've been clear about what my problem is. Please bear in mind for your response that I have no PHP knowledge, I only do HTML and this is a sort of -charity- project, so I try to learn as I go. Meaning: step-by-step might be necessary! heh. Sorry!
Thank you very much in advance.
Try:
<?php get_sidebar( 'evento' ); ?>
This should pull in sidebar-evento.php

Need Help for my Custom Page Template

I'm very new to this PHP coding.. actually I'm not a programmer, but I need this help from anyone here...
Anyway, what I need help from you:
I have written a small snippet of Custom Page template, here it is:
------------------------------
<?php
/*
Template Name: MyCustomTemplate
*/
?>
<?php get_header(); ?>
<?php get_footer(); ?>
------------------------------
Now I have installed a wordpress slider plugin "Nivo Slider"..
Now I'm not understanding how do I call this plugin into my custom template...
Iam trying to achive home page with a Slider and some ads in it.. eg: I need my home page like this: www.papayaclothing.com/shop/
So, could anyone please provide me a code to work that?
Please try following code, make sure that slider you are trying to call is published:
<?php
//valid for Nivo Slider version < 1.8
echo do_shortcode('[nivoslider slug="my-slider"]');
?>
Let me know if my answer was helpful.

Resources