Reply To: Possible to assign different layouts?

Home Support TotalPress Possible to assign different layouts? Reply To: Possible to assign different layouts?


Founder/Lead Dev

OK well my friend I have found a solution to the problem at hand 😉

I have already added this to the next version of TotalPress and TP Primo. If you like you can edit two files and add a tiny bit of code.

So go into wp-content-themes/totalpress/assets/totalpress-metaboxes.php. Once you have it open search for thise $prefix = 'totalpress_'; there should be three instances of this.

OK, so right after that snippet of code, add this:

$post_types = get_post_types();

Then look for this: 'post_types' => array('post','page'), (again three instances), and change it to this: 'post_types' => $post_types,.

This will take care of TotalPress, so let’s move onto TP Primo. Go into wp-content/plugins/tp-primp/assets/metaboxes/tp-primo-metaboxes.php.

At the very top you will see this function tp_primo_register_meta_boxes( $meta_boxes ) {

just after that add the following:

$post_types = get_post_types();

So it should look like this:

function tp_primo_register_meta_boxes( $meta_boxes ) {
  $post_types = get_post_types();

Then look for the following:

      'pages' =>   array (

and change it to this:

'post_types' => $post_types,

Click save and now the metaboxes should be visable for any custom post type.

Hope this helps. Please let me know how it goes.