Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24249

    Hello,

    we bought recently the enfold theme. thanks a lot, this is great work!!!

    i do have little diffulties to replace or add some functionality to some shortcodes. my goal is to create a similar shortcode as the “Blog Posts”, which would load a custom post type instead of the “post” post type. this is meant to be used in the template builder.

    what i have tried so far:

    add_filter('avia_load_shortcodes','add_shortcode_folder_new');
    function add_shortcode_folder_new($paths_new)
    {
    $paths_new = array(get_stylesheet_directory(). '/my-new-folder/');
    return $paths_new;
    }

    in order to see if it works, i changed the name of the shortcode from “Blog Posts” to “CPT Posts”, but nothing happens. i don’t get any errors or anything else. why is it not working???

    thanks a lot,

    Eugene

    #122896

    ok. i solved it myself.

    here the code:

    add_filter('avia_load_shortcodes','add_shortcode_folder_new',11);

    function add_shortcode_folder_new($paths_new)

    {

    $paths_new[] = get_stylesheet_directory(). '/my-new-folder/';

    return $paths_new;

    }

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘custom shortcodes’ is closed to new replies.