Comments are not displaying in wordpress 3.1 - php

Im running Wordpress 3.1 and its showing that there are comments (ie: 3 comments) but when you click into the single blog post they don't appear but the comment form appears.
Im not sure whether its a template issue or something's not correct in the functions.php.
I have the multi site function running for multiple blogs.
Anyone else having this problem and or have a solution?

It has to be template issue, make sure that you have comments.php file present in your theme directory. You may want to copy from default theme too. The functions.php has nothing to do with that though.

Related

How to change custom HTML in wordpress

I need to rewrite some code on my client's website that I haven't made. The problem is that it runs on wordpress (w/ a customised theme I guess) that I've absolutely no experience with whatsoever.
Where do I find the source code made by that previous developer? I tried to find it in the "wp-admin" page but I failed :D ... where would you edit website's landing page?
Thanks ;)
Depending if the developer wrote a new theme or edited another theme, and if the lather, wether he did it the right way.
Check out the name of your current active theme and you should find it here:
/path/to/your/wordpress/installation/wp-content/themes
If he altered another theme, there should be another directory named "activeTheme-child". There any changes should be made so you can run updates on the main theme.

Default text appears on wordpress

Actually i'm working on a wordpress website, which is related to school, i'm using universh WP theme which is purchased. I'm getting the below text as default:
Want create site? Find Free WordPress Themes and plugins.
See, i've marked those words. Actually its a dynamic page, i've checked the core code. It's only the
the_excerpt()
function. After that i don't have any idea, where it comes from. Also i've read this thread So please don't recommend that thread, its not working i've tried the way there mentioned.
P.S. Also the text will disappears when I login and try to edit the page.
What text editor You use ? Most easy way will be open folder with theme in some editor and search this string "Want create site? Find Free WordPress Themes and plugins." in all files - then You will know where they add it ... or You can check every file, because this string must be included somewhere, maybe in function.php they add some modification to the_excerpt();
I think when you ass content in post default editor then is not showing in the_expert() function
So you can add content in expert editor then after call the_expert() funtion
Check that your theme is not using the get_the_excerpt filter to prepend that phrase to all the excerpts.
Additional, if you only checked the files that load for that specific template, I would recommend that you run a search for that string for the entire theme. The source of the issue might stem from functions.php or even some JavaScript file.
Please update the core files or update version of your WordPress. Use Latest one.

Wordpress Preview shows wrong Template

Recently, when I view a page in Wordpress Preview mode, it always loads the default template (theme page.php file) whereas when I look at the published page, it's the right template. I have around 10 different templates for my pages. Just keep in mind that I'm not talking about the theme itself, but the Wordpress template structure. I included three pictures. The admin panel one, shows different templates for my page.As shown, I chose Fixed-Width Clean Page. The second picture shows the page in Preview mode.As you can see it includes a sidebar which is included in the default template but not the one that I chose. And the last picture is the Live view of the website which is correct. As you can see the sidebar doesn't exist. I searched all over the internet and did some suggestions, but none of them work (like saving the permalinks again, changing the theme and changing it back again, etc). The only change that I recently made was upgrading to Wordpress 4.7.4 and blocking access to admin panel by ip using .htaccess file (I removed the .htaccess file, but still no luck). Any suggestions would be appreciated.
OK, after some time I figured out what the problem was. The "WP Subtitle" plugin version 2.9, breaks the preview functionality if you have multiple templates. I report the issue to them as well, but posted the answer if somebody came across the same problem. In order to fix the issue temporarily, i commented out the below line (line 74) on the plugin's main file (wp-subtitle.php):
//add_filter( 'the_preview', array( 'WPSubtitle', 'the_preview' ), 10, 2 );

Standard HTML & CSS to wordpress page

I created a webpage in Standard HTML and CSS and everything looks / works exactly how I want it too.
Now I need it to appear as it is on a wordpress site (http://www.texasenergyessentials.com/). I already created a template page and can see it in the template select in the wordpress "add new page" window. I was hoping I could just select the template and leave the text editor blank but that doesn't seem to be the case. All I get is a completely un-formatted page that says welcome guest.
What is the easiest way to get https://gist.github.com/anonymous/8545681 to work on the aforementioned wordpress site? ?
Thanks!
P.S. Please don't link any codex files I just spent 2 hours digging around in them :(
Try to read and understand how http://codex.wordpress.org/The_Loop works
Install this theme https://code.google.com/p/wordpress-naked/ and try to work your way to the desired theme by editing theme files. That will be much easier.
Maybe the problem can be understood by reading the template hierarchy:
http://codex.wordpress.org/Template_Hierarchy
(especially check the visual overview)
If you name your file page-[insert-page-id-here].php Wordpress will use it for the page you've created. Get your page id by editing the page and looking it up in the url.

WordPress: don't show 404 when no posts exist

Currently there is a bug in WordPress if you have a Posts Page set under:
Settings->Reading->A Static Page->Posts Page
If there are posts, than the page (e.g. with a slug called news) displays the post, and uses index.php from the theme.
But, with this configuration, if there are no posts, then it calls the theme's 404 page. This is definitely a bug, and has been submitted (Ticket #10822). It should be letting index.php show whatever it wants upon !have_posts(), but right now the page doesn't seem to be called at all.
My question is: is there a workaround for this bug without modifying core wp files? I'd be open to a plugin, theme changes, a custom page template, htaccess changes, etc.
I just performed a test for it. It isn't actually serving a 404, it's using index.php but since no posts are found so it falls outside of the have_posts(). Are you sure it's not a plugin or theme causing your issue? I tested this with the default theme on a base install of WordPress.
Most theme files have as part of their WP loop a catch for no posts, i.e.:
<?php else : ?>
Sorry, but you are looking for something that isn't here.
<?php endif; ?>
That might be what you're seeing. You can use a custom page template without that text (leave the loop) for yoiur posts page. And try Reveal Template | coffee2code.com to find out what template file you're looking at.

Categories