Tagged: ,

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

    I’m trying to write a custom version of the masonry_entries.php shortcode that adds the tags and categories of an entry to the title but I’m having trouble getting this information.

    Could you point me the right direction to grab the categories and tags and write them out with the title?

    #334175

    Hi rgruber!

    Thank you for using Enfold.

    Please refer to these links on how to get the categories and tags of posts:

    http://codex.wordpress.org/Function_Reference/get_the_tags
    http://codex.wordpress.org/Function_Reference/get_the_category

    If you’re going to modify the shortcodes, please use a child theme. Add this on functions.php:

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
    $template_url = get_stylesheet_directory();
    array_unshift($paths, $template_url.'/shortcodes/');
    
    return $paths;
    }

    Create a folder called “shortcodes”. Add the masonry_entries.php there.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.