• Resolved BrightonCreatives

    (@brightoncreatives)


    Hi there,

    Im trying to add the subtitles to custom post types, but its not showing up. My theme name is brickwork and im adding this into the functions.php

    ‘function brickwork_add_subtitles_support() {
    add_post_type_support( ‘youxi_portfolio_cpt_name’, ‘subtitles’ );
    }
    add_action( ‘init’, ‘brickwork_add_subtitles_support’ );’

    Am i doing something wrong? im not sure if that is the correct slug for the portfolio items, how do i find it?

    https://www.ads-software.com/plugins/subtitles/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Hi there,

    Thanks for reading over this. I really can’t help unless I know the exact name of your custom post type. Otherwise it’d just be a ton of guessing and checking. Are you super-sure that the CPT you’re trying to add support for is youxi_portfolio_cpt_name? You could run a test with get_post_type( $post ) to see what the post type of your custom posts are.

    Cheers,
    Philip

    Thread Starter BrightonCreatives

    (@brightoncreatives)

    Yes it says in the php
    ‘post_type’ => youxi_portfolio_cpt_name(),’
    So im pretty sure thats right.
    When you say run a test, I dont really know what that means, im not very good with php.
    Where do i need to place this code? at the moment its at the top of my functions.php file.

    ‘function brickwork_add_subtitles_support() {
    add_post_type_support( ‘youxi_portfolio_cpt_name’, ‘subtitles’ );
    }
    add_action( ‘init’, ‘brickwork_add_subtitles_support’ );’

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    It looks like youxi_portfolio_cpt_name() is the name of a function. Where is that function located in your theme? Cheers.

    Thread Starter BrightonCreatives

    (@brightoncreatives)

    Its in the archive-portfilo.php file which is template for the portfolio on the site.

    how do i find out what the name of the custom post type is then?

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Please post that function here. Thanks.

    Thread Starter BrightonCreatives

    (@brightoncreatives)

    can i email you with a log in perhaps? im not really sure what yu are asking me for or how i find it

    Thread Starter BrightonCreatives

    (@brightoncreatives)

    Dont worry ive figured it out, its working now. thanks for your help

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Great! Thanks for letting me know!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Subtitles on custom post types’ is closed to new replies.