Tagged: advanced editor, meta
-
AuthorPosts
-
May 15, 2015 at 1:47 am #444701
I may be doing something wrong…I hope so. This is my first time playing with Enfold, or generally with an advanced theme such as this.
When I create a post and switch to the advanced layout editor, that post appears on the single post page exactly as I lay it out, missing things like title, author, category, date published…like a “normal” post would display.
So, I looked at another post which does display that information, again as a “normal” post would. When comparing them, I realized that the difference between the two is the advanced editor. I took the post that was “not” working, copied it’s content, then switch to the default editor, which comes up blank (no data in the editor), pasted my content in there, updated, then refreshed the page with the “wrong” format post and viola, it displays correctly.
Now if for some reason this is “correct” behavior, I don’t like it. I would further assume that if this is the case, that I can drop some component segments onto the page and would “mimic” a standard post page. Again, don’t like that because now I have to be sure that the format is the same between both. Now, while I may not like it, if this is the “correct” behavior, I can work with it. Of course my hope is that I’m just doing something wrong…because I love the advanced editor and would just prefer to use that for everything in my posts.
Can someone offer some experience with this and provide some direction?
Thanks,
Mike
May 15, 2015 at 10:02 am #444851Hey mcraig!
That is the correct behaviour, the ALB for posts is ment to be an alternative for those who want full control over a post, like a page more or less. But you can use ALB elements like Social Share Buttons to mimic a regular post.
Best regards,
RikardMay 15, 2015 at 10:30 am #444868I still maintain that this is annoying…but nevertheless a very acceptable answer and I appreciate the response. I have been enjoying this theme / framework product so much, I can overlook a minor inconvenience. It’s more important for me to know that I’m not just making some mistake.
Thank you very much for the help,
Mike
May 18, 2015 at 5:19 am #445500Hi Mike!
Thanks for understanding, I’m sure the ALB for posts will be developed further in the future and we will hopefully be able to make it more logical from a users perspective than it currently is.
Regards,
RikardJune 8, 2015 at 10:19 pm #456361I’m having the same issue. I’d like to have the author, category, date published, view. I’ve looked into the ALB options, but didn’t see one. Perhaps using the Code element with a specific code?
Help.
June 10, 2015 at 3:19 pm #457278Hi!
then please use the standard editor instead of the ALB for showing your blog.
Feel free to make a feature request for Kriesi here: kriesi.at/support/enfold-feature-requests/Best regards,
AndySeptember 23, 2015 at 2:16 pm #507779Hi,
“Use the standard editor” is not really an acceptable answer, because Enfold’s main strength is the Advanced Layout Editor. What if I need to template the settings of a complex shortcode element, like a content slider, in a Post? Are you saying you will not support this option? That I have to use the awkward magic wand tool every time? My clients won’t accept this.
This is the biggest headache I have with Enfold and it could be solved if you would simply tell us how to add Meta information (Author, Category Date Published, and Tags) to an Advanced Layout Editor Post.
- This reply was modified 9 years, 3 months ago by kdagnall.
September 23, 2015 at 4:25 pm #507969Gotta say, Kdagnall is right. What makes Enfold theme is its ALB. Not having something as standard as the author meta seems short-sighted. Even if this feature cost extra, it would be worth it to many of us. (And, yes, I’ve already gone and voted for this feature.)
September 24, 2015 at 7:45 am #508189Hey!
Please create a file called post_meta_infos.php on config-templatebuilder > avia-shortcodes folder. Add this code: http://pastebin.com/qsXmPDQJ
You’ll have a new element called Post Meta under Content Elements panel. You might find a few bugs here and there but it should work as a basic element.
Cheers!
IsmaelSeptember 25, 2015 at 12:36 pm #508953Thanks Ismael, I’ll give it a try. Kudos to you, you’re the only moderator on this forum who has taken this request seriously. I was so frustrated dealing with this Elliot guy I was ready to dump Enfold for 10+ upcoming projects.
September 25, 2015 at 12:41 pm #508956Hi!
Please do so and let us know so we can mark the thread as resolved or assist you further :)
Cheers!
YigitSeptember 25, 2015 at 11:39 pm #509308Works great, I am able to create an AVE template that will allow my clients to revert to a similar format for Posts using Advanced Layouts. I made a simple change to display the Post Tags:
<?php /** * Meta Element * Adds meta info to the page */ // Don't load directly if ( !defined('ABSPATH') ) { die('-1'); } if ( !class_exists( 'avia_post_meta_info' ) ) { class avia_post_meta_info extends aviaShortcodeTemplate{ /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['name'] = __('Post Meta', 'avia_framework' ); $this->config['tab'] = __('Content Elements', 'avia_framework' ); $this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-comments.png"; $this->config['order'] = 28; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'av_post_meta'; $this->config['tinyMCE'] = array('disable' => "true"); $this->config['tooltip'] = __('Add the post meta infos', 'avia_framework' ); //$this->config['drag-level'] = 1; } /** * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className * * * @param array $params this array holds the default values for $content and $args. * @return $params the return array usually holds an innerHtml key that holds item specific markup. */ function editor_element($params) { $params['innerHtml'] = "<img src='".$this->config['icon']."' title='".$this->config['name']."' />"; $params['innerHtml'].= "<div class='avia-element-label'>".$this->config['name']."</div>"; $params['content'] = NULL; //remove to allow content elements return $params; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "") { $the_id = get_the_ID(); $output = '<header class="entry-content-header">'; $output .= "<span class='post-meta-infos'>"; $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false)); $output .= '<time class="date-container minor-meta updated" {$markup}>'.get_the_time(get_option('date_format'))."</time>"; $output .= "<span class='text-sep text-sep-date'>/</span>"; if ( get_comments_number() != "0" || comments_open() ){ $output .= "<span class='comment-container minor-meta'>"; ob_start(); comments_popup_link( "0 ".__('Comments','avia_framework'), "1 ".__('Comment' ,'avia_framework'), "% ".__('Comments','avia_framework'),'comments-link', "".__('Comments Disabled','avia_framework')); $comment = ob_get_clean(); $output .= $comment; $output .= "</span>"; $output .= "<span class='text-sep text-sep-comment'>/</span>"; } $taxonomies = get_object_taxonomies(get_post_type($the_id)); $cats = ''; $excluded_taxonomies = apply_filters('avf_exclude_taxonomies', array('post_tag','post_format'), get_post_type($the_id), $the_id); $tag_taxonomies = apply_filters('avf_exclude_taxonomies', array('post_category','post_format'), get_post_type($the_id), $the_id); if(!empty($taxonomies)) { foreach($taxonomies as $taxonomy) { if(!in_array($taxonomy, $excluded_taxonomies)) { $cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' '; } elseif(!in_array($taxonomy, $tag_taxonomies)) { $tags .= get_the_term_list($the_id, $taxonomy, '', ', ','').' '; } } } if(!empty($cats)) { $output .= '<span class="blog-categories minor-meta">'.__('in','avia_framework')." "; $output .= $cats; $output .= '</span><span class="text-sep text-sep-cat">/</span>'; } $output .= '<span class="blog-author minor-meta">'.__('by','avia_framework')." "; $markup = avia_markup_helper(array('context' => 'author_name', 'echo'=>false)); $output .= '<span class="entry-author-link" $markup>'; $output .= '<span class="vcard author"><span class="fn">'; ob_start(); the_author_posts_link(); $author = ob_get_clean(); $output .= $author; $output .= '</span></span>'; $output .= '</span>'; $output .= '</span>'; $output .= '</span>'; $output .= '</header>'; //tags on single post if(has_tag()) { $output .= '<strong>Tags: '.$tags.'</strong>'; } return $output; } } }
September 26, 2015 at 8:05 am #509389Hey!
Great! Glad it worked. And I would like to apologize for the frustration. We are doing to our best to help and we’ll try to accommodate customizations as long as it is within reason. We can’t do so every time because there’s a lot of inquiries posted every day. Thank you for your patience.
Cheers!
Ismael -
AuthorPosts
- The topic ‘Post meta information not appearing on single post in restaurant theme in Enfold’ is closed to new replies.