Add/Edit Blog Categories

Data contained in our JSON is being saved in our app’s CoreData in SQLite format. In order to sort our CD entries we have to specify exactly the value of our saved Strings.

The value we are interested in is the Name: “Car Tuning”, “Electric Cars”, “News” and “Uncategorised”. Open BlogView.swift and edit this section at line 52 according your needs.

The changes will affect the sorting function anyBlogResults() on the Blog View in the app.

In order to change also the text presented in the app we need to edit following lines. On the same page scroll until line 200. Here you have to replace or add your category’s Names to match WordPress.

In a similar way we can customise AllGalleryVertical.swift.

Keep in mind that any change done in WordPress must be reflected in app. Best is to make the necessary changes once in the beginning.

Share this story
Share on facebook
Share on twitter
Share on telegram
Share on whatsapp
Share on pinterest

Related stories