Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1145455

    Hello, I am trying to make a customized version of the single.php file for certain types of posts. I would like to make the following changes:

    1) Different dimensions for the featured image (i.e., use 1089 x 1089 instead of 1089 x 568)
    2) Have the title and author name shown ABOVE the featured image (instead of below it)

    Please advise on how I can make these changes.

    3) On a related note, is it possible to set the featured image size for this customized post template to just be based on a set width only? For example, I would want all of my images for this customized type of post to have the same width (i.e., 1089), but some of the images might be taller or shorter than others and I would not want for them to be auto-cropped to match a specific height. I would want for the images to be shown at their native heights.

    Thanks!

    • This topic was modified 5 years, 1 month ago by ACNLatitudes.
    #1145509

    Hey ACNLatitudes,

    1. Please have a look here
    https://kriesi.at/support/topic/full-list-of-image-dimensions-for-enfold/#post-373563

    2. Just move the code around.

    3 Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Victoria

    #1145566

    Thanks for the reply.

    1. I looked at that link. The following is the code that is currently being used for my featured image size:
    $avia_config[‘imgSize’][‘entry_with_sidebar’] = array(‘width’=>1089, ‘height’=>568);

    Do I just copy that line of code and then paste it to a new line in functions.php? If so, what do I need to modify in that code (other than the dimensions) to differentiate it from my normal featured image (such that it is linked up with the single-wpdmpro.php file referenced below)? I only want the special featured image dimensions on my special blog posts (I don’t want to overwite the dimensions that are currently being used for single.php)..

    2. I have copied all of the code from my single.php file to a new file named single-wpdmpro.php. I am looking at the code that was copied from single.php, but cannot figure out where it is that I am supposed to swap things around in order to make the title/author text go ABOVE the featured image. Please advise.

    Here is the code:
    ************************************************************
    <?php
    global $avia_config;
    /*
    * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    */
    get_header();
    $title = __(‘Blog – Latest News’, ‘avia_framework’); //default blog title
    $t_link = home_url(‘/’);
    $t_sub = “”;
    if(avia_get_option(‘frontpage’) && $new = avia_get_option(‘blogpage’))
    {
    $title = get_the_title($new); //if the blog is attached to a page use this title
    $t_link = get_permalink($new);
    $t_sub = avia_post_meta($new, ‘subtitle’);
    }
    if( get_post_meta(get_the_ID(), ‘header’, true) != ‘no’) echo avia_title(array(‘heading’=>’strong’, ‘title’ => $title, ‘link’ => $t_link, ‘subtitle’ => $t_sub));
    ?>
    <div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
    <div class=’container template-blog template-single-blog ‘>
    <main class=’content units <?php avia_layout_class( ‘content’ ); ?> <?php echo avia_blog_class_string(); ?>’ <?php avia_markup_helper(array(‘context’ => ‘content’,’post_type’=>’post’));?>>
    <?php
    /* Run the loop to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-index.php and that will be used instead.
    *
    */
    get_template_part( ‘includes/loop’, ‘index’ );
    //show related posts based on tags if there are any
    get_template_part( ‘includes/related-posts’);
    //wordpress function that loads the comments template “comments.php”
    comments_template();
    ?>
    <!–end content–>
    </main>
    <?php
    $avia_config[‘currently_viewing’] = “blog”;
    //get the sidebar
    get_sidebar();
    ?>
    </div><!–end container–>
    </div><!– close default .container_wrap element –>
    <?php get_footer(); ?>
    ************************************************************

    #1147227

    Hi ACNLatitudes,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Victoria

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