• Resolved samsa17

    (@samsa17)


    Hi,

    I’d like to use the Custom Text property for the Post Category. I want to be able to put in my own custom link structure for the Post Category rather than the default /category/category_name.

    Is there a shortcode I can use to access the post category within the custom text field? eg. [post_category] or something like? Does the custom text and custom link recognise short codes?

    Thank you,
    Sam

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Samsa17,
    We have a filter hook available that you can use, but you’ve to know the coding. Please try to copy my below code and paste it under your Theme functions file(please paste the end of the file).
    To navigate the function file, go to Apperace => Theme File Editor and from the right sidebar, select Theme Functions.
    Screenshot: https://i.imgur.com/cclCDI3.png
    (Feel free to customize the link and title value on my code)

    Code to copy:

    function breadcrumb_items_array($items){
        $items[1] = array (
            'link' => 'https://myCustomBradcrumb.com',
            'title' => 'My Custom Breadcrumb',
        );
    
        $items[2] = array (
            'link' => 'https://myCategoryUrl.com',
            'title' => 'My Custom Category',
        );
    
        return $items;
    }
    add_filter('breadcrumb_items_array', 'breadcrumb_items_array');

    Expected preview: https://i.imgur.com/Ztqxuia.png

    Documentation URL: https://pickplugins.com/documentation/breadcrumb/filter-hooks/breadcrumb-items-array/

    Let us know if it helps.
    Regards.

    We haven’t heard you for a long time and assume this issue is resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Text for Post Category’ is closed to new replies.