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 the articles) example.com/blog/article (A specific article) example.com/about (A static page) example.com/portfolio (Another static page) Right now, however, only the static pages work as … Read more

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>console.log(‘insideIf’);</script>”; wp_enqueue_style( ‘custom_css’, get_template_directory_child() . path); } So considering 1,2 and 3 are the ids of the pages, the pages with the ids 2 … Read more

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 page website. I’m using get_pages($args); to display each page in my front-page.php file. This works great. Now here’s … Read more

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-page and Blog, it doesn’t switch to archive.php which you might expect to and then use index.php in the place of front-page.php. 1 Answer … Read more

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 based on the return value from $post->ID. The interesting behaviour I am getting is that $post->ID … Read more