Wordpress - theme doesn't show newest posts - wordpress

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(); ?>

Related

Wordpress: Pages work, Posts don't

First of all, I'm totally new to WordPress so please be patient :)
Anyway, I have created a custom theme with a bunch of pages, a menu and a startpage (index.php), and everything is working fine. I have also created a few posts and those are not working at all. I have created a small loop that display the 5 latest posts on the startpage as links with date, and they show up as intended, but if I click on one of the links the startpage just reloads. As the page has reloaded it displays the correct permalink in the browser address bar, but I'm still stuck on the startpage. Same if I try to preview my posts from WP-admin, it just display my start page.
I have no idea what I'm doing wrong here and I'm no php coder. This is the code I have in my page.php file, maybe there is something wrong with it?
<?php get_header(); ?>
<div class="content">
<?php while ( have_posts() ) : the_post(); the_content(); endwhile; // THE LOOP ?>
</div>
<?php get_footer(); ?>
there is a difference between posts and pages. Try to put this code into a file called index.php so it will work for posts too.
If wordpress cant find a page.php (this is for pages) or single.php (this is for posts) it will look into the index.php as a fallback.
those are the files - enjoy :)
1. style.css: your page styling goes in here.
2. index.php: acts as fallback if the specific php files are not found.
3. single.php: single posts template
4. page.php: single page styling goes here
5. archive.php: acts as archives template (by month, author,...)
6. searchform.php: style and configure your searchform here
... there are many more. here is a cheat sheet with page types / theme structure .If you need further information google for types followed by tutorial
example: wordpress single.php tutorial
all the best
fab

add page title to latest posts frontpage in wordpress

I set my reading section to latest posts in Wordpress. My homepage logs fine but I would like to add a page title above the posts. I have looked in my theme's files and couldn't find the file to edit. As a test, I tried to add an image to my theme's loop.php and it appeared above the post on my homepage. The location was right but the image appeared on every one of my category blog list pages. How do I add a page title to the homepage that only appears on the homepage above the blog list?
Here are some resources for you to use, WordPress: https://codex.wordpress.org/Function_Reference/get_the_title
Eg:
you can use
<?php echo get_the_title(); ?>
or
<?php echo get_the_title($ID); ?>
There is lot of resources on WordPress, best of luck!

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.

Disqus comment form not displayed on self hosted Wordpress site

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

How do I get the WordPress sidebar to show up on a post's detail page?

My example is here
I am customizing the default template, but something isn't placed right. Can't figure it out.
By the way, I am asking this here and not at WordPress because frankly, their forums are horrible as far as response times go. Stackoverflow has always done me good :)
Without seeing the php code it'll be hard to know why. Do you have a seprate template for single post ie singlepost.php? If so, make sure you're include sidebar.php into that.
Looks like single.php in the default theme doesn't pull in the sidebar by default. You'll need to add <?php get_sidebar(); ?> right before <?php get_footer(); ?> in single.php or just delete the single.php and wordpress will use index.php instead which has the sidebar.

Resources