def blog__get_post(id: nil, permalink: nil)
      return {} unless id || permalink

      if id
        post = LatoBlog::Post.find_by(id: id.to_i, meta_status: 'published')
      else
        post = LatoBlog::Post.find_by(meta_permalink: permalink, meta_status: 'published')
      end

      post.serialize
    end
def blog__get_post(id: nil, permalink: nil)
      return {} unless id || permalink

      if id
        post = LatoBlog::Post.find_by(id: id.to_i, meta_status: 'published')
      else
        post = LatoBlog::Post.find_by(meta_permalink: permalink, meta_status: 'published')
      end

      post.serialize
    end
This function returns a single post searched by id or permalink.