Need help restructuring WordPress Site

Joined
Oct 17, 2014
Messages
25
Likes
13
Degree
0
Hi there!

I still have a amazon affiliate site, built with WordPress back in 2016.

Most posts are in the form of best list, e.g. Best xyz for xyz 2016, similiar to thewirecutter.com.

Now the site is still earning good money and I want to take it to the next level.

The site is built with the Thrive Editor (it's called Thrive Architect now), and everything from Product Boxes to Comparison Tables were built manually, per drag and drop. Products are added manually, links are added manually etc.. it takes alot of time.

The niche im in is changing fast and so do the best products.

Currently I'm looking for better ways to manage the products / comparison tables.

Product Comparison Tables:

Currently they are static HTML tables, built with the Thrive Editor. Links/Product Images etc. are static and added per hand.

  1. https://azontables.com/
  2. try to integrate React with WP, and build a React Table

Product Boxes:

  1. Build something with custom template & ACF (not sure how to do this)
  2. try to integrate React with WP, build a custom Component
About the react part, I was thinking of adding all products in a DB, and then display them on the frontend with WP/React.

I would be very thankful if someone could guide me in the right direction.
 

BCN

$$$$ ¯\_(ツ)_/¯ $$$$
Joined
Dec 26, 2015
Messages
98
Likes
126
Degree
0
We do a custom thing, where we keep a products table and then custom fields. Then you can run jobs to check if product is still available etc
 
Joined
Oct 17, 2014
Messages
25
Likes
13
Degree
0
We do a custom thing, where we keep a products table and then custom fields. Then you can run jobs to check if product is still available etc
Which custom fields are you talking about? Can you explain it a bit more detailed so I can understand?
 

Ryuzaki

女性以上のお金
Staff member
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
3,656
Likes
6,888
Degree
8
In the past I've used ACF to create custom fields that populate all kinds of things, including comparison tables. If you know how to use React then you'll be able to figure out Advanced Custom Fields. It's a piece of cake, but does require you to edit the templates of the theme. It sounds like you know how to do this.

In the present I still use ACF, but I've converted all of my cool features from sets of custom fields to custom Gutenberg blocks. They look the same, perform the same, but are saved within the posts content instead of in another database table as meta data. Much cleaner in that sense and in the workflow of creating a post. Only works if you're using Gutenberg though.

Doing it the old way is simple though. You create a Field Group like "Comparison Table." You set the rules to only show in the Reviews category, or with a certain Page Template, or any number of rules to make it work for you. Then you go in and create fields within the group with labels like "Product Name 1," Product Description 1, Product Link 1, Product Image 1.

I recommend giving each field's actual name a prefix like acf_table_product_name_1, with the prefix being acf_. Because later, you may want to clear all that out of your database and if you don't have a common prefix on them all you'll never hunt it all down easily.

But now you have a Field Group that shows on the right "edit page" with fields corresponding to your comparison table's needs. Now you just go into the PHP template and build out the HTML table like normal, but this time you "templatize" it with your acf fields, like...

Code:
<?php
// Cache your fields
$product_name_1 = the_field('acf_table_product_name_1');
$product_link_1 = the_field('acf_table_product_link_1);
// ... so forth with all fields and all products...

// Check if fields actually exist so your site doesn't break if ACF plugin gets turned off
if ( $product_name_1 && product_link_1 && ... && product_link_3 ) { ?>

// Build out your HTML table
<div class="table_product-name"><a href="<?php echo $product_link_1; ?>" target="_blank" rel="nofollow"><?php echo $product_name_1; ?></a></div>

// End conditional
<?php } ?>
That should give you an idea of how to do it. It's a piece of cake. you don't have to cache the fields or do the big conditional if you don't want either, and it's even simpler.
 

BCN

$$$$ ¯\_(ツ)_/¯ $$$$
Joined
Dec 26, 2015
Messages
98
Likes
126
Degree
0
Yes, we use advanced custom fields. And just code the template files and logic as a plugin. There's also a plugin to expose ACF to the WP api. We use the WP API with Vue JS to do some cool stuff too.

For my agency site, I'm actually testing to build a headless wordpress, and use VUE + Nuxt to make the frontend. Because I have too much time ....