Changes to my current themes standard views

Hey,

I have a theme called Sahifa and I would like to make some small changes to how it looks, is it something you would be able to help me with?

Br,
Morten

  • Sajid

    Hi @Morten! Hope you are doing good today and very warm welcome to WPMUDEV community :slight_smile:

    Yes we would be glad to assist you what ever way possible. Please share the link your website and also explain what you want to achieve. If you can post a screenshot that will be very helpful for us to better understand and we will try our best to get you there :slight_smile:

    Look forward towards your response :slight_smile:

    Cheers, Sajid

  • Bilberg

    Hey,

    That sounds brilliant.

    I have 4 things:
    1. On our frontpage we have a "Seneste nyheder fra BadmintonBladet" (see "Frontpage" attachement). I would like it to show a thumbnail picture instead of the rectangular one, and also the part with the excerpt and "Læs mere" should be removed.
    2. When looking at a single post, the related posts feature (see attachment "Related Posts":wink: should show thumbnails as well, and not rectangular pictures).
    3. In the widget (right side of the page), there is a recent posts (see attachement "Recent posts widget":wink:, this shows a weird size of one of the news. This should always show the thumbnail version of the picture, and not different type.
    4. I would like to use the "Ultimate Facebook"-plugin, but for some reason there is a Facebook error everytime I try and activate it. What am I doing wrong?

    Thanks a bunch for looking in to it.

    Br,
    Morten

  • Sajid

    Hi Morten! Welcome back :slight_smile:

    I am sorry for delay it took longer then usual.

    To get all this we must have a child theme to override default theme settings. You can create your own child theme by following steps mentioned in this blog post.
    https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/

    To change the images from rectangular to thumbnail, I have to look into the code of this theme and even register a new size for it. If you want me to do this for you then please send me your theme so I can make changes and test them quickly on my test environment.

    For remaining points I also need to have copy of this theme so I can suggest where you should go and what you should do there. If its okay for you then please send me the copy of this theme using our private contact form in below format. Please include download link.

    Subject: "Attn: Sajid Javed"
    Theme download link:

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :simple_smile:

    https://premium.wpmudev.org/contact/

    Cheers, Sajid

  • Bilberg

    Hey,

    There seems to go something wrong when I try and create a child theme. The live preview looks like attached.

    My style.css file has the following text:
    /*
    Theme Name: Sahifa Child
    Theme URI: http://badmintonbladet.dk/sahifa-child/
    Description: My first child theme, based on Sahifa
    Author: Morten Bilberg Rasmussen
    Author URI:
    Template: sahifa
    Version: 1.0.0
    Tags: two-columns, fluid-layout, fixed-layout, custom-background, threaded-comments, translation-ready, custom-menu
    Text Domain: sahifa-child
    */

    My functions.php in the sahifa-child folder has:
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }

    Can you help.

    Br,
    Morten

  • Sajid

    Hi @Morten! Hope you are doing good today :slight_smile:

    In functions.php file PHP (<?php ) tags are missing. Add below code replacing all existing code in this file.

    <?php
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }

    Let me know ho it goes :slight_smile:

    Cheers, Sajid

  • Sajid

    Hi @Morten

    You do not need to update child theme to get updates. In fact child themes are made to be never updated :slight_smile:

    WordPress will automatically feed you updates for parent theme that you should only care about. You can simply ignore this message or change the name of your child theme directory from Sahifa Child to some thing more unique.

    Remember after changing the directory name you have to activate this theme again.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Sajid

    Hi @Morten

    Can you please send me FTP details so I can make sure you created the child theme correctly ?

    You can send these details using our private contact form in following format.
    Subject: "Attn: Sajid Javed"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    https://premium.wpmudev.org/contact/

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Sajid

    Hi @Morten Rasmussen

    Hope you are doing good today and thanks for sending in the details :slight_smile:

    I checked the child theme you created is correct. It seems there is a new version of theme available 5.2.2 and you are using 5.2.1. Go ahead and update your theme to latest version.

    The changes I wrote about in the start, will they be possible now?

    Yes it should work perfectly fine. Take a backup of your theme first before updating the parent theme. In case some thing happened, then you can restore it.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Sajid

    Hi Morten Rasmussen,

    Hope you are doing good today :slight_smile:

    While searching this error I found this thread on tielab's forum regarding child theme update problem. But its not public forum and require login to access the support area.
    http://support.tielabs.com/forums/topic/child-theme-sahifa-theme-update-problem

    I changed the images size and added below code in functions.php file of child theme.

    function child_theme_setup() {
        add_image_size( 'tie-small'		,110,  110,  true );
    	add_image_size( 'tie-medium'	,310,  310, true );
    	add_image_size( 'tie-large'		,310,  205, true );
    	add_image_size( 'slider'		,660,  330, true );
    	add_image_size( 'big-slider'	,1050, 525, true );
    
    	//New image size
    	add_image_size( 'wpmu-custoom-size'	,272,  272, true );
    }
    add_action( 'after_setup_theme', 'child_theme_setup', 11 );

    You can also change the size your self according to your requirements. Change the numbers is first number is width and second one is height. For example in below code 660 is width and 330 is height in pixels.
    add_image_size( 'slider' ,660, 330, true );

    I also added one custom wpmu-custoom-size size to override the existing one in related post and override default related-post.php file (can be found in framewor/parts folder of child theme).
    https://wordpress.org/plugins/regenerate-thumbnails/

    Note: Most important part is after making changes (each time) in image size function you must regenerate thumbnails from Tools > Regenerate thumbnails.

    I regenerated selective images (see screenshots) because you have lots of images that can easy take lots of time to regenerate all in bulk. You must do it in less busy time on your website.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Bilberg

    Hi,

    Thanks for the link, I will look into it.

    I do not really understand the changes. Basicly I did not want new thumbnails, just that the ones already in place was used on the frontpage, the related posts and latest posts.

    I have attached the type of thumbnail I would like to be used always in the three places. Also the excerpt on the frontpage should be removed.

    Also could you have a look at the part with the Facebook plugin?

    Br,
    Morten

  • Sajid

    Hi @Morten Rasmussen

    I do not really understand the changes. Basicly I did not want new thumbnails, just that the ones already in place was used on the frontpage, the related posts and latest posts.

    I did not changed any thumbnails. I just changed the size to make them square.

    Please post the exact dimensions of each thumbnail image and I will make that change for you.
    Front page post thumbnail size : Width X Height (in pixels)
    Related post thumbnail size : Width X Height (in pixels)
    Recent widget post thumbnail size : Width X Height (in pixels)

    Also could you have a look at the part with the Facebook plugin?

    It would be great if you create separate ticket for separate questions, to get fastest response from other staff members too and keep a thread organized for original issue to avoid confusion.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Bilberg

    Hey,

    I have created a new ticket for the plugin.

    The issue with the thumbnails, is now there are squares in for example videoes (attached as videos).

    In the screenshot "Recent post widget" from before there is a size of thumbnails (marked with red). This size would need to be the standard everytime there is a picture in that widget. So the picture marked with green should not happen.

    On the "Related posts" on every post I would like the same standard thumbnail used (see blue on "Related post":wink:.

    On the frontpage I would also need the standard thumbnail (orange), and then no excerpt. So that the headline is shown next to the thumbnail picture.

    I do not know what size they are, but it is the one used already on the page.

    Br,
    Morten

  • Sajid

    Hi @Morten

    Hope you are doing good today :slight_smile:

    I am sorry for delay and confusion here.

    In the screenshot "Recent post widget" from before there is a size of thumbnails (marked with red). This size would need to be the standard everytime there is a picture in that widget. So the picture marked with green should not happen.

    On the "Related posts" on every post I would like the same standard thumbnail used (see blue on "Related post").

    Have you regenerated the thumbnails from Admin > Tools > Regen. Thumbnails > Regenerate All Thumbnails ? Once you all thumbnails have been regenerated all thumbnails will become same size.

    Let me know how it goes and we will move to CSS changes for title and excerpt.

    Best Regards
    Sajid

  • Sajid

    Hi @Morten

    Hope you are doing good today :slight_smile:

    I just made changes in child theme framework folder and in functions.php file. I guess you already removed framework folder from child theme.

    I added some php code in functions.php file, to alter the size of thumbnails and can see its also not in functions.php file.

    I did not made any changes in parent theme of sahifa. I am sorry to be not so helpful.

    Best Regards
    Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.