Serial No displayed in Posts Heading

Posted in: Newspaper
Post count: 40

Hello TagDiv,
My question today is related to this page.
https://pildat.org/right-to-information

As you can see in the “Latest Publications” section of the page, the latest 10 posts are being displayed with “load more” button appearing at bottom correctly to load more publications. Is there any way these posts can be shown along with their serial no? Like Publication No. 1 then below it Publication No.2 , then Publication 3 etc?

Post count: 20688

Hi,

I don’t quite understand what you mean by serial number, the load more is a form of pagination.
It will load more posts in the block when clicked, the modules will not change and they will still display only the information they are supposed to (post title, date, author, excerpt and comment count).

Post count: 40

Hello Simion,

Thank you for the quick reply. BY Serial no. I mean like this
1.
2.
3.
4.
5.

As you can see there is no serial no being displayed.

Post count: 20688

There is no such option unfortunately, the modules will not display a numbering or listing of the posts it displays, this is not implemented. Maybe you could include a number in the article title so it will be displayed there.

Post count: 40

Including a no in the article is not viable as a Publication might appear in more than one categories with different numbers, so its not possible unless and until we make one publication exists in one category only.

I understand this is not possible by default and need some modifition at core level.

The data which I am referring to is coming from NewsPaper theme’s Block 12. Can you please tell me where can I edit this module’s file? I am sure a php based “For-Each” Loop can be put just before the Post Title and will automatically increment by 1 after each post.

Post count: 20688

The modules of the theme can be found here
https://www.screencast.com/t/pKRe3039
Blocks here – https://www.screencast.com/t/Um1ewPGmSR
Note that a modification to a module or block will affect every instance of it, unless maybe you create some conditions if possible.
The module and block files can be customized through a child theme
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Post count: 40

Thank you Simion. You are right about affecting every instance. Is it possible to register a new block and new module and then copy the code from existing module and block on it and then modify that code?

Post count: 20688

You can add new modules and blocks, these are guides here
https://forum.tagdiv.com/the-theme-api/
This way you could add a new module and block, it will be unique. There is an example for download as well, in the form of a plugin
https://forum.tagdiv.com/practical-example-how-to-add-a-new-block-and-module/

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.