Is it possible to have the loop display posts on home.php? I want to have a static front page using front-page.php and then have the loop show posts on home.php. I put a link to home.php however, it is not showing posts and it is pulling up the index page as well. I thought home.php took precedence for showing blog posts. The only way I can get posts to show up on another page is by using the dashboard and setting reading preferences. Is there a way to avoid this so a user that downloads my theme won't have to change reading preferences for the theme to work as designed?
create a custom function for fetching post in the function.php file and then display it through shortcode in any home or front-page file.
Related
Newbie to WordPress coming from Joomla. Trying to get my head around how wp knows to use base.php or page.php. also if I have a page called about us do I create a page called page-about-us.php and if so how does wp know to open it
Slug
Slug is a simple id of posts and pages. WordPress by default creates slug for Posts, Pages, Categories and Tags as long as we have not created a specific Slug. Slugs are always created in small letters with “-” sign in between the words.
Example
your page name is -> “about us“ the slug of that page will be “about-us”.
In this way,this will execute from page.php and if you want to customize it in your way make a page-about-us.php.
I am trying to get all the posts from my wordpress site to one single page. after implementing the custom theme first i created the page named "blog". In settings->reading i set the post page to blog. I created some posts. but instead of showing these posts my blog page show index page. I have tried same procedure on default activated theme then it is working fine. please let me know what can be the issue for this ?
If you create a page named blog, then the template to produce the content of the page should be called page-blog.php (in your theme folder).
in WordPress I have an inner page called "blog", and in settings->reading I have that page assigned as the page for blog posts. I want that page to be excerpt instead of full posts. In the theme page.php is used for the (page) loop for the Blog page, but that's overridden by the assignment of blogs posts to that page and I can't simply change "the_content" to "the_excerpt" in page.php to make this work.
I need some conditional tag code to this happen (or would that even work?) in page.php, or is there another way to accomplish this?
The Wordpress template hierarchy diagram will help you out - Wordpress Hierarchy
Your page.php template displays an individual page, it will not be generating the blog archive page you want to edit. Depending on your theme that will either be category.php, archive.php or index.php.
Just change the relevant file to change the excerpt on your blog page.
I am new to Wordpress. I got this template that I want to use for my site. The template link is here. By default this template allows you to put all sorts of plugins on the homepage. Problem is I don't really want to style my blog the way the template comes. What I just want is to have the full details of my blog posts showing on the homepage and then the categories by the side. Does any know of any plugin that I can use to display blog posts full details instead of just lists (with or without thumbnails)
Your homepage should use the file index.php from the theme (located in wp-content/themes/name_of_your_theme). Open it and search for the_excerpt. It should be located in the Loop, as many things related to Posts in Wordpress.
If what you want to display in the homepage is the same thing than when a single post is displayed, then open single.php in the same directory. That's the theme file used when displaying a single post. Search for the_content inside the Loop and see how it's done. You want to do the same in index.php, more or less copypasting or replacing carefully the_excerpt by the_content. Well, it'll be a little harder than that (you've to understand what you remove, replace or copy) but that's the idea.
Relevant documentation in Codex: the_excerpt (esp. the 2nd paragraph) and Template Hierarchy (answers the questions related to which file is called for Homepage, single post, a category, a page, etc)
Is there any plugin available which I can use to post custom content on My front page?? I am using front page which has link to other blog pages. I want to put custom content on this front page but i am unable to find any plugin.
whatever plugins which i searched gives this facility for sidebar in a widget format there were no option for manually putting content in my theme.
Also is it possible to put latest post by a particular author on this page??
You need to edit index.php file in you're theme to do this . have a look at query_posts , what i would recomend is having a category called home_content and limit all the theme files using query_posts not to show that category , and show posts from that category only on the homepage ( index.php file from you're theme ) .
You could allso ask wordpress related questions on wordpress.stackexchange.com