• Resolved rajbhilawekar

    (@rajbhilawekar)


    Hi,

    I created a CPT ‘Book Reviews’ and custom fields ‘Author’ and ‘rating’. I can use shortcode to display these fields on a single review page. But the free version of my theme ‘Blocksy’ doesn’t have an option to add CF on the theme’s dashboard, I had to use a plugin like yours. I can see the custom template in the plugin and even after I’ve saved the template, the archive page of book reviews is only using layout that’s predefined in blocksy. I presume that this can be easily solved by tweaking the theme file, but I don’t know how to code. I hope you can help me by telling what and where exactly should I copy a code/shortcode or if there’s any other way.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey @rajbhilawekar

    If I’m following you, you would like to replace the archive layout, with Custom Layouts?

    For this, I think you would first need to edit your archive using FSE (full site editing), and then add the custom layout to the archive.

    I’m assuming Blocksy is using FSE – https://developer.www.ads-software.com/block-editor/getting-started/full-site-editing/

    Once you get to editing your archive I can help with integration of the two.

    Let me know how you get on.

    • This reply was modified 2 years, 7 months ago by Code Amp.
    • This reply was modified 2 years, 7 months ago by Code Amp.
    Thread Starter rajbhilawekar

    (@rajbhilawekar)

    Hi @codeamp

    I don’t think blocksy supports FSE as of now. Does this plugin only work with themes that support FSE. Also I don’t have child theme installed. Is that essential for it to work? The template and layout is visible in the plugin but not on the actual page. See here :

    https://photos.app.goo.gl/SJvL65LaCgRYCTh9A

    It seems that the layout from the plugin isn’t overwriting over the default layout of blocksy. What do you suggest I should do?

    Plugin Author Code Amp

    (@codeamp)

    Hey @rajbhilawekar

    Usually editing the post type archive is done in one of 3 (or more) ways:

    1. In traditional themes, this might have been modifying the archive.php file or similar in your child theme
    2. In FSE, you can edit this screen simply by editing archives
    3. Other themes + builders and have their own of editing a post type archive

    What you will have to do, is find the “blocksy” way of editing you CPT archive page.

    Once you do that, you can add our custom layouts shortcode to the page, to replace the blocksy layout.

    I’ll see if we can have a look at Blocksy over the next week, but its probably worth reaching out to them, and asking “How can I edit this CPT archive layout”

    FYI – Custom Layouts is not fully FSE ready (about 80% of the way there) but should work in most environments + setups with a bit of tweaking.

    Thanks

    • This reply was modified 2 years, 7 months ago by Code Amp.
    • This reply was modified 2 years, 7 months ago by Code Amp.
    Plugin Author Code Amp

    (@codeamp)

    Ah I see here , it looks like your post type archive screen:

    https://photos.google.com/share/AF1QipPHodts3j-aFJvLnMl6gS8Y1sYWNvEJFfJNdI82JMaCmtIB-3Jab6NJXuiJSzTPjA/photo/AF1QipPq1CBmr9LK-kWeXPVB-ttZIDR1GJ4xr4U3vXwR?key=ZEZaUjcwM2d6Z3NpdDJaNnJGT0x6LUdiR3BEWjdn

    So what I would do is, delete the cards in the page, and replace it with your custom layouts shortcode, something like:

    [custom-layout id='123']

    Where 123 is the ID of your custom layout (you can find this shortcode on the right bar of the layout editor.

    Thread Starter rajbhilawekar

    (@rajbhilawekar)

    Hi @codeamp

    I reached out to blocksy and stated them my problem. I’m waiting for their response, and I will remember to update you on it. I’ve tried a few page builders but not a single of them had an option to change archive post layout in their free version. I can’t afford to spend much on plugins or anything else at the moment. Also I tried doing what you suggested in blocksy, but unfortunately blocksy’s customizer doesn’t actually allow adding shortcodes, so one is only allowed to use the predefined layouts. I believe the only way is to make changes to the themes file, which I’m not good at. Quick question : Will adding the shortcode in the theme file do anything? If so, where do you suggest I should try adding it? If it isn’t too much of a hassle, can I ask you to have a look at blocksy whenever you can. But again, I don’t want to be a bother so please feel free to overrule it if it’s too much work.

    Thread Starter rajbhilawekar

    (@rajbhilawekar)

    Hi @codeamp

    In their response blocksy stated that ome cannot have a custom layout in the free version. Also I found a star rating plugin that displays ratings in the post meta. It’s unfortunate that I can’t display other custom fields which I wanted to with the help of your plugin. But I will have to make-do with what’s available at the moment. I won’t be using your plugin anymore, but will leave a 5 star rating nonetheless. Thank you for being patient and trying to solve my problem. I wish you good luck in further development of your great plugin.

    Thank you again.

    Plugin Author Code Amp

    (@codeamp)

    Hey @rajbhilawekar

    Thanks for your feedback. We also took a look at Blocksy and what you have found is correct.

    There is one alternative to get this working, which would be to download the Blocksy child theme, and then you can modify the archive template file directly. You can find the link to the child theme in your dashboard:
    https://snipboard.io/kefnLS.jpg

    If you went this route, then you would need to learn a bit about the WP template hierarchy, and which file in your theme corresponds to the archive (and then you would need to add our shortcode to it). A bit more info about that here:
    https://developer.www.ads-software.com/themes/basics/template-hierarchy/

    That might not be easy / straight forward though…

    All the best

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can’t display the layout on front end.’ is closed to new replies.