Support » Plugin: CataBlog » Creating a new token

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author macguru2000


    You will need to hack the plugin to achieve what you want. There should be some loose instructions and advice to hacking the plugin for this specific need in past support topics / threads, please look there. Just keep in mind that hacking the plugin can cause all sorts of problems for your wordpress site, and I will take no responsibility for them.

    Good luck!

    Thanks Zach, in the DEFAULT TEMPLATE i had put %AUTHOR% since i wanted to create a new field called author. When i was to look at the preview a text saying (“%AUTHOR%) showed up meaning that i wasn’t recognizing it as a token. Then i did some changes and added some lines on the files and made the %AUTHOR% text disappear from the preview. I also made a field called AUTHOR appear on the right pane when i edit a catablog item.

    This means i got most of it done, but now my problem is that when i enter a value on the AUTHOR field when editing an item doesn’t show up on the preview window when i entry the token: %AUTHOR%.

    My question Zach is: do you know which file and line to edit in order to connect what i enter in the AUTHOR FIELD with the preview window or in the DEFAULT TEMPLATE?

    Please help me because i think i got most of the work done but apparently the new field i created is not connected to the new token i created.

    Thanks for your help!


    Plugin Author macguru2000


    You still have a lot of changes to go, I don’t have the code in front of me currently so I can’t give you line numbers or anything like that. I can tell you that there is a post meta data block that contains all the field data for catablog, so you need to modify the code for that. Then you can instruct the plugin to use that data for the %AUTHOR% token.

    If I have some time I will look into the code and give better instruction, but for the time being I hope that helps. Cheers 🙂

    Look for a save function and a render function in catablog.php….those should be the main places to look.

    Zach, you are amazing! thanks for your help!
    I just got one more question:
    I installed a plugin called “PRINTFRIENDLY” which displays a print button for customers to print my item. This plugin lets you put the button in pages or posts by typing [printfriendly] and i tried to type this inside the SINGLE LAYOUT in order to display this button in every item page but when i preview it a text saying “[printfriendly]” shows up which means that this layout is not recognizing other plugin tokens or anything like that. This plugin also has the option to write the code:

    <?php if(function_exists(‘pf_show_link’)){echo pf_show_link();} ?>

    But it just doesn’t do anything when i type it on the layout.

    Do you have any idea how can i resolve this problem?
    Thanks for your help!

    Plugin Author macguru2000


    Try using the other plugin’s PHP code in your theme’s single-catablog-items.php file, which is PHP. The layout (catablog template) is not interpreted, but instead treated as a string, among other reasons, this is for security.

    Thanks Zac, i finally resolved most of these issues.
    Im sorry that i keep asking questions but this is my first wordpress site so please help!
    I noticed that i can sort by title but how can i sort the titles starting by the letter B for example?

    Would it be something like: [catablog sort=”title” order:”descending” starting:”B”]

    Does CATABLOG have something like this example in order to start on a specific letter or do you have any solution for me?

    Hello @ebenezer357, have a look at the following link, it provides all the answers to your question above.

    I hope it helps you find what you are searching for.

    Kind regards

    Plugin Author macguru2000


    As far as I know, WordPress does not offer support for your latest request. As CataBlog is built upon WordPress, it also does not offer functionality for sorting from a specific character. That being said, you could always write a custom SQL statement to load those catalog items (posts), but it would require quite a bit of work on your side to implement.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Creating a new token’ is closed to new replies.