Questions tagged [blog-page]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
36
votes
9answers
102k views

Check if current page is the Blog Page

I'm new to WordPress. I am looking for a way to check if current page is the blog page in the code of the header file. I've checked but I can't find a way. Help me, Pls.
10
votes
3answers
62k views

Creating custom blog page template the right way

I want to create a new custom page template for the presentation of blog posts. I realise that when you assign a page to display posts via Settings > Reading, it then will assign home.php to display ...
7
votes
2answers
7k views

Show Default Editor on Blog Page ( Administration Panel )

In WordPress 4.2 it included a nice feature which labeled what page was the Front-Page and which page was the Blog ( Latest Posts ). Unfortunately, it also removes the default editor on the page ...
4
votes
1answer
3k views

I put my blog on a subpage, how do I get page title?

I've got my blog setup on a subpage (not the front page) and I'm using the template file home.php, how can I get the contents from the page editor onto this subpage? If I change the title of the page ...
4
votes
2answers
6k views

ID for posts/blogs page

I have a website which has a static front page and a blog page where all the blogs are displayed. I am using my own theme and have created some custom meta boxes that display content in a sidebar ...
3
votes
1answer
8k views

What is archive.php used for?

Dumb Questions Ahead: If index.php and archive.php are practically the same thing, what's the point of having archive.php? When should I ever want to use archive.php over index.php? If I use front-...
3
votes
1answer
304 views

Blog.php or how to display recent posts?

I created a home.php which doesn't display the recent posts in the standard-blog-style. Just have a look at my website to see what I mean. I want to create a link that leads to something like "http://....
2
votes
5answers
49k views

Display content from a specific category

I'm trying to get my news page to display content from one category only (number 3) but I cant seem to get it to work. Instead of just displaying posts from category 3 it displays posts from all ...
2
votes
3answers
5k views

Why aren't my posts showing?

I'm creating a theme for my portfolio site. After a some time of trial and error research and almostss, I'm stuck. It's going to be very minimal site in content, therefore I decided to create a one ...
2
votes
3answers
6k views

Exclude category on blog list page

I've got a site with a News page (archive for category 'news') and a separate Blog page. When I make a post for the News page I select the category 'news'. So, on the news page you only see the posts ...
2
votes
3answers
6k views

Non existing blog pages are not redirected to 404

I've got a page called Blog. In the Settings -> Reading I've set my Blog page as Posts page. In the menu when I click on the Blog link the posts are loaded correctly and pagination works, so far so ...
2
votes
2answers
90 views

is_page(id) not working for blog page

I am trying to add a css file specific to 3 pages using the is_page(postid) for a WordPress website in the functions.php if (is_page(1) || is_page(2) || is_page(3) ) { echo "<script&...
2
votes
2answers
8k views

How can I have a static title on my blog page?

My blog page is not my homepage. How can I add a title to the top of the page? i.e. "My Blog". Right now there is no title on the page. The title of the first post is at the top. (Sorry it's on my ...
2
votes
1answer
5k views

How to display blog posts on a dedicated page?

I'm in the middle of moving to WordPress from another CMS. I definitely have to keep the links intact, which are like this: example.com (Redirects to /blog) example.com/blog (The blog, displaying all ...
2
votes
3answers
2k views

How to display only the excerpt in the blog/posts page with Gutenberg?

I'm building a custom child theme using the Twenty Nineteen default WordPress theme as the parent. I added some text in the excerpt section available in the Editor as follows: But the full content ...
2
votes
2answers
87 views

When using global $post in blog index file (home.php) it returns the latest blog post instead of current page

In my home.php file I have only this code: <?php global $post; print_r($post->ID); die(); ?> This is printing the ID of the latest blog post, but what I want is to get the ID of ...
2
votes
1answer
2k views

Custom Theme Blog page not showing Posts

I am developing my custom theme in WordPress from scratch. Now when i am working with my blogs page its not showing any of the posts i have changed my "index.php" page but i think there must be some ...
2
votes
1answer
81 views

Automatically adding post and pages to new blog setups

I'm using the ThreeWP Broadcast plugin to add and control post and pages from the main blog to all my sub-blogs in the network. Is there anyway i can automatically add all of my post and pages from my ...
2
votes
1answer
138 views

How to change the permalink structure of a master page?

Links on the page I use are progressing as follows: http://example.com/image/1 The code I use for Functions.php add_action( 'init', 'wpse316713_pagination_base_rewrite_rule' ); function ...
2
votes
0answers
13 views

I am having trouble with article formatting when exporting/importing articles from the production to the development environments

Whenever I export a couple of articles from my production site to my development site, the imported one loses all its spacings (&nbsp elements). Has anyone ever encountered this? I use Wordpress ...
2
votes
2answers
4k views

Setting a static home page and blog page without using the settings

This may seem like a stupid question, and it probably isn't possible, but is it possible for me to set a static home page (using front-page.php) and a blog page (using home.php, I think) in my theme, ...
2
votes
0answers
108 views

Sitewide categories for all the blogs in the network [duplicate]

Possible Duplicate: WordPress Multisite - global categories I'm trying to do sitewide categories. like when a category is made in the main blog that category is added to all the new blogs created ...
2
votes
1answer
56 views

How to block access to blog-page for users not logged in?

My blogpage [is_home()] is located at /blog. My static page [is_frontpage()] is not the blogpage and located to /about-us. For users not logged in, the startpage is the static page. For users logged ...
1
vote
2answers
100 views

Defining different theme for Blog posts page

So, I'm using my wordpress with a static front page and then I have Blog link that opens the blog posts. My question is, how can I apply a different template/styling only to that area?
1
vote
3answers
3k views

How to get the list of posts in a static page other than front page?

So, for the thousands using WP as CMS, a typical approach is that of using the 'A Static Page' option from the Settings > Reading admin page. However, I'm in a different scenario: our front page is ...
1
vote
2answers
4k views

index.php template is used instead of blog page

I am trying to set WordPress so that home page is static, and the blog page is a separate page. So, I created two page templates in my theme., lets call them home_template and blog_template. Then, I ...
1
vote
1answer
899 views

Multiple Blogs on one site. Best Practise

I've been tasked with adding a blog to an already up and running client site. The site uses wordpress as it's CMS already. So a blog install should be a relatively simply task and simply a matter of ...
1
vote
1answer
29 views

How do I make the homepage as the blog page?

In my WordPress website it only has the blog page. There is no home page and other pages. I want the homepage to be the blog page. When I customize the home & blog page to the same page, it ...
1
vote
1answer
3k views

How to display on the blog page the posts corresponding to the selected language, using Polylang

I use Polylang (free) to internationalize a customer site. I set a default language (= FR), I added a language switcher in my navbar (FR and US flags) and I set the Front and Blog pages for both ...
1
vote
1answer
758 views

Create a front page template and separate page for posts?

I'm building a WordPress theme. I need two type of pages, one is home page which will display on www.example.com. I also need a list of all my posts on www.example.com/blog/, but I need both in one ...
1
vote
1answer
728 views

home.php not loading

I have an issue where home.php won't load, so wordpress insists of using index.php to display blog posts. I created home.php by copying the entire content of index.php into home.php. Is there a way to ...
1
vote
2answers
4k views

Blog Posts not showing title

I have my Reading settings set to Static pages and blog is set to a page called What's New. When I go to this What's New page I can see the post content but the post title with link to post page is ...
1
vote
1answer
2k views

Creating a new blog using PHP

I have a Multisite where I'm creating a user from a PHP file, using the code below: define('WP_USE_THEMES', false); require_once (dirname (dirname (__FILE__)) . '/mygroup/wp-blog-header.php'); ...
1
vote
1answer
240 views

Adding parent pages to posts

I want to add a parent page to my blog posts so I can track their traffic together on Analytics. I want to avoid adding extra tracking code in the header to avoid slowing my site down. So what I want ...
1
vote
1answer
70 views

How to change the link structure of the homepage?

There are "your last posts" on the homepage. Under normal circumstances, the page proceeds as follows: http://example.com/page/1 http://example.com/page/2 e.t.c I want to change this link structure....
1
vote
1answer
1k views

Allow a static page to show on a dynamic home blog page before the posts

I am trying to figure out what is the best practice to allow a customizable static page to show on the top of the dynamic front home page. What I am asking is not using a custom page a such as front-...
1
vote
2answers
1k views

How to query 'posts_per_page' to display a different blog posts index template?

Trying to create a 'switching' blog template using home.php, controlled by 'Blog posts per page' setting in the admin area. If set to '1', it will show the single post template. Anything higher and it ...
1
vote
1answer
124 views

How to create Blog Post Specific Widget

I want to create widgets which will display based on post. I have considered the option of creating a widget post type using Advanced custom post type plugin and populate this widget while writing ...
1
vote
1answer
34 views

Is the “Posts page” really required? Can problems occur if I leave it blank?

I read some scary comments here. (By Blog page, he means the Posts page in the reading settings.) The Blog Page gives out several indicators to social sites and Search Engines that it's a Blog. [......
1
vote
2answers
150 views

Show the page title on blog page

I created a page for my posts, and a home.php for the structure. I would like to show the page's name on the top of the posts, but the result is always the latest post. My code: <?php get_header(...
1
vote
3answers
119 views

Do I need an empty page for a different blog page?

Okay, let's say I have a website with the following navigation: HOME - ABOUT - PRODUCT - NEWS - CONTACT The 'about' and 'contact' page are just simple pages of course. The 'product' page is just an ...
1
vote
2answers
130 views

How do I get blog posts to appear within CMS?

I'm working with a WordPress CMS website that was set up without a blog. I want the site to continue to function as it has, with mostly static pages, including the home page. I want a page called "...
1
vote
2answers
311 views

Can I install/embed Wordpress on a 'single page'?

I'm building a website from scratch (PHP, jQuery) and want to have full control over the design, implementation, etc. I want to install Wordpress so that when you go to a certain section of the site, ...
1
vote
0answers
27 views

Front page with registered query params in URL shows blog archive instead of front page

WordPress version: 5.4.1 I've built a plugin that includes a shortcode. The shortcode shows a product listing and has a couple of filters. The filters trigger a page refresh through JS with query ...
1
vote
1answer
35 views

Apply a style for 4 blogs and another style for the next 4 blogs in wordpress blog page?

I tried to customize my blog page. The first 4 blogs should be designed in one style while the next 4 blogs has a different style. When I applied the css, all the blogs were shown the same way. I was ...
1
vote
1answer
90 views

How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts

How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts: i have this code here: add_action( 'wp_head', 'set_featured_background',...
1
vote
0answers
362 views

Blog page Server error 500 with stick post loop in query.php

Using sticky post on site near about 5000 sticky post i have. In wp-includes/query.php here i have bellow snippet code.on line 3748 to 3760.If i comment this code the blog page work properly. if ...
1
vote
0answers
69 views

multiple blogs on single site

In my custom theme, I had to set one of the templates to home and then under Reading Settings set that to be the Posts Page. That allowed the site to read from the content of my home.php. And I ...
1
vote
1answer
115 views

Problem with Comment link in Blog [closed]

I have all the settings setup to allow comments on my Blog postings. However, when you click on the link to post a comment nothing happens. Attached is my comments.php file Also the site is www.djjigs....
1
vote
2answers
273 views

Wordpress Blog - Grid View

by default Wordpress shows blog posts one beneath the other showing short text and, if available, an image. The question is - is it possible to change that? I would like to have a grid consisting of 3 ...