Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1248790

    Hi,
    the post slider does not allow for a selection of displaying author names in a multi-author blog environment. This is unfortunate and should be implemented in one of the next updates.

    I tried all kind of css modifications to get the blog author into the header of a post slider UNDERNEATH the blog title.

    I have already SUCCESSFULLY implemented this for post full view in loop.index.php using:

                        echo '<div class="blog-author-mn minor-meta">'.__('by','avia_framework')." ";
                        the_author_posts_link();
                        echo "</div>";
    

    The css for .blog-author-mn is also defined.

    Could you please support me with a css suggestion to display also in the blog post preview in the slider under the title? I just don’t seem to find the right arguments.

    Thank you and best
    Michael

    • This topic was modified 3 years, 10 months ago by MichaelNickel.
    #1248854

    Hey MichaelNickel,

    Could you please attach a mockup of what you’re trying to achieve?

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1248862

    Hi Victoria,
    thanks for your quick response, please find some private information below.
    Best
    Michael

    #1249308

    Hi Enfold-team,

    I’m still looking for a solution. If you could tell me which php file is controlling the layout of the post slider, I can probably tweak it myself in a way similar to what I have done for the general post layout through the code above which I added to loop-index.php.

    So far, I have not found the right php file for the post slider and the documentation here does not give any specificity on the php file and/or path for the files which define the slider.

    My suggestion is still that in a future update you add the option of “multi-author blog” -> “display title & author” AND “display title, author & excerpt” to the drop down menu of the layout setting within the avia layout builder.

    Any hints are appreciated very much.
    Thank you
    Michael

    #1249324

    Hi Michael,

    The post slider file is
    /config-templatebuilder/avia-shortcodes/postslider/postslider.php

    You can try the code shared here:

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1249357

    Hi Victoria,
    I followed the post you linked to and the secondary post inside there.
    I found the relevant reference code in line 898 and added afterwards the following code:

    			                    // Author in Post Slider MN BEGIN
              
                $author = get_the_author_meta( 'display_name', $entry->post_author );
                			$author_link = get_the_author_meta( 'user_url', $entry->post_author );
    											
    											if(!empty($author))
    											 {
    													 $meta .= '<div class="slide-meta-del">/</div><span class="blog-author minor-meta">';
    													 $meta .= '<a href="'.$author_link.'">'.$author.'</a>';
    													 $meta .= '</span>';
    											 }
                $meta .= $author;
                
             // Author in Post Slider MN ENDE
    

    I created the relevant php file in my enfold-child subfolder according to the original path, i.e. enfold-child/config-templatebuilder/avia-shortcodes/postslider

    It does not work, anyway.
    Since there are several if-cases in relation to blog style I have moved the code block around. It does not change a thing.
    I also tried the code I used to display authors in the masonry (see code in initial post above), without any success.

    My blog styling is “elegant” if that helps to define the right position for the code.

    Any suggestions on code changes how to display the author underneath the title?

    #1249394

    Ok, I got it working.
    However, only after I modified the php file in the enfold parent theme directories. It does not work if I copy these files to the enfold-child.
    Any idea why that is? It works for the mansonry_gallery files to use modifications in the enfold-child …
    I would love not to loose these changes with the next enfold updates …

    #1249661

    Hi MichaelNickel,

    Here is the code you can put in your funtions.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;
    }
    

    And then you can make changes in the files that you added to the child theme.

    If you need further assistance please let us know.

    Best regards,
    Victoria

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