How to Customize the Jump to Recipe Button
Looking to move or customize your Jump to Recipe button? Read below for our recommended steps!
Moving the Button Post by Post
This involves adding a Jump to Recipe shortcode into the post that will allow you to place the button wherever you’d like. For reference, here’s the code below:
[mv_create_jtr id=“{ID_OF_CREATE_CARD}” type=“{recipe/diy}“]
Keep in mind you will need to use the ID of the Create card and choose whether it is a recipe or diy card for the type. For example, a code you could use would look like:
[mv_create_jtr id=“9” type=“recipe”]
Additionally, if you decide to manually place these buttons, you would likely have to disable the JTR button in Create’s settings or else you’d have two JTR buttons on the same post.
Theme Support for Custom JTR Buttons
As of Create 1.6.3, themes can now change the default location of JTR buttons:
This can be activated by adding
add_theme_support('mv_create_custom_jtr')to the theme'sfunctions.phpfile.Once support has been declared, activating the JTR button will not auto-place it on the posts. The shortcode for the button will need to be manually placed in the theme’s template files.
We do not have any support for building the JTR button, but you can build the button using below:
In order to build the button, the theme developer will need to run
echo do_shortcode( [mv_create_jtr id="' . $create_id . '" type="' . $type_of_card . '"] )in the template file with$create_idand$type_of_card(recipeordiy) filled out with the correct data to perform the jump action.mv_get_post_creations( $post_id )- This can be used to pull the IDs on the post, and then the theme developer can use mv_create_get_creation( $id, true ) on the first ID to get its proper type.
If you wanted to build your own custom button and not use Create’s, you should be able to get the ID of the card using the steps on the last bullet point. It’s possible placing the recipe card inside a container and referencing that in the custom button you build would work as well.
