• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Ani's Webdev Blog

A learning diary of website development

  • Home
  • Demo
    • Ajax Contact Form
  • WordPress
  • Front-end
  • Backend

WordPress Themes

[WordPress] Create custom post type programmatically

Modified on: March 13, 2023

wordpress create custom post type

In this article, let’s talk about custom post types. What are they, why we need them, how to create them programmatically, and have a look on its anatomy in case you want to have custom design templates for the pages generated by the custom post type.

Filed Under: Wordpress, Wordpress Plugins, WordPress Themes Tagged With: php

[WordPress] Open Images in Posts into Lightboxes On Clicks (Without Plugins)

Modified on: January 2, 2021

open images into lightbox

In this post, I would like to implement one small feature: when user clicks an image within my post entry, the image will be opened into a lightbox, so that it is bigger to see. This is useful in case the image has some small details that you would like users to see better. I […]

Filed Under: Backend, Front-end, Wordpress, WordPress Themes Tagged With: javascript, php

[WordPress] How to Display Modified Date By Using Hooks (in Newspaper Theme, or Any Theme)

Modified on: December 21, 2020

how to display modified date in wordpress using hooks

A modified date will let web visitors know the date that an article was updated, not the publish date (which probably was several years ago!). It provides some trust to the content of the article, also is a plus point for SEO. I use Newspaper theme in two WordPress websites. It works amazingly as described, […]

Filed Under: Front-end, Wordpress, WordPress Themes Tagged With: php

[HTML, CSS] Add a floating button to WordPress website without plugins

Modified on: September 19, 2020

add a floating button to wordpress site

If you want to create a floating element (such as button) to your WordPress website but do not want to install any plugin, follow this article. In this post, I will show you one simple method to add a call-to-action element (buttons, or text, or anything) stay fixed on the web page no matter how […]

Filed Under: Front-end, Wordpress, WordPress Themes Tagged With: add_action, css, html, php, wordpress hooks

[WordPress] Add content at the end of every post without plugins

Modified on: September 19, 2020

Sometimes you may want to add information to every posts but don’t want to open every single post to add that line. In this article, I will show you how to implement three use cases simply by using wordpress add_filter and the_content hook. You may add anything at the end, or at the beginning, of […]

Filed Under: Wordpress, WordPress Themes Tagged With: add_filter, php, wordpress hooks

[WordPress] How to transform post title into UPPERCASE without plugins

Modified on: September 18, 2020

To transform the post title into different style, for example uppercase, you don’t need to use any plugin. In this article I will show you how to do it simply by using WordPress filter. What we are going to do is to add a filter hook, so that the title of a post will go […]

Filed Under: Wordpress, WordPress Themes Tagged With: add_filter, php, wordpress hooks

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »

Primary Sidebar

Hi! I am a Vietnamese coder living in Oulu, Finland. Currently I am working with PHP, MySQL, HTML, CSS, and JavaScript. This blog is my learning diary, in which I share knowledge from my own experience or research. Hopefully you can find something useful here and don’t hesitate to open a discussion or leave a feedback!

FOLLOW MY BLOG

Thank you for visiting this website! I hope you find something useful here :). Contact me by email: anh@anhkarppinen.com.