How would you create a custom widget to display or custom posts on a page?

[ad_1]

Let’s say I have a design, and in that design there’s something like a “recent posts” section, that queries the most recent posts, custom posts or something and displays them but in a custom style? So, it gets the title and positions it in a certain, customized way, the image and positions it in a certain customized way, with a read more button, maybe an excerpt, etc, but automatically? So the end client can add new posts and they will be automatically added to the home page and styled that custom way?

Themes you get off of ThemeForest mostly have their own widgets and CPT, but I’ve decided to go with one or two themes (Astra or GeneratePress) with a builder (Elementor or GB) to avoid buying a different theme every time.

[ad_2]
2 Comments
  1. Create a custom block for your WordPress theme or plugin. The widget era is towards the end, but custom widgets can also be made as a plugin.

    Better still check the WordPress block options. You have the option to create own post/page grids like the one you describe. It will allow you to create your own content section using elements such as headlines, except, featured image, etc. There are several block plugins available too. Explore wordpress.org

  2. Since you want to use Elementor and willing to upgrade it to pro version you can use the loop builder so you can use the design you want [https://elementor.com/blog/introducing-the-loop-builder/]).

    If you are not willing to use Pro you can create your own custom query and design it with your liking then just add it as a short code.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer