Tagged: 

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

    Hi,

    In my single post page, I would like to have three columns with widgets displayed just under the header. I understand that I need to modify the single.php file for that. I have a few questions:

    • I can copy the single.php file to my child theme, but what do I put in the functions.php in order to make it work.
    • What is the best practise to put those columns in the page?

    Thanks in advance!

    Regards,

    Steven

    #786349

    Hey steviger,

    1.) Yes, you can copy single.php to your child theme and you don’t need to add anything in functions.php to make it work. This is how wordpress uses templates for single post page, it looks for single.php in the child theme, if it can’t find any, it will check the parent theme for it, so since single.php of the child theme is prioritized it will be used instead of the one in the parent theme.

    2.) I tried to check the link of the site that shows the 3 columns however I am getting this (I just replaced the url):

    This site can’t be reached
    www.domain.com’s server DNS address could not be found.
    

    Can you try to give us a screenshot instead? you can upload the screenshot to imgur.com and post the link here. :)

    Best regards,
    Nikko

    #786358

    Hi Nikko,

    Teh extension wasn’t right. Please see the correct address in de PC.

    Cheers,

    Steven

    #786840

    Hi,

    Get the actual shortcode of the 3 columns then use it as the value of the do_shortcode function inside the single.php file, just above this line.

    get_template_part( 'includes/loop', 'index' );
    

    // https://developer.wordpress.org/reference/functions/do_shortcode/

    Best regards,
    Ismael

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