Similar to which site? The link to the example that you give above doesn’t work.
Similar to http://pro.com
Thank you.
You can add anything you like if you create a page (called “home”) for example and set your home page to be a static page pointing to that page in Appearance > Customize.
Hi @oerdem19, I found your request interesting and decided to make a snippet for this.
http://www.themesandco.com/snippet/adding-sections-to-any-page-or-posts-in-customizr/
Hope this will be what you needed!
wow , thank you so much nikeo…
I can’t get it to work 🙁 (i’ve pasted the PHP code and added 1 page id to the array) but I am sure I will figure it out
thank you so much
Well that’s tomorrow’s play session organized 🙂 Thanks nikeo!
Thanks a lot Nikeo, Great support I must say.
I will give it a try and let you know about results.
Hi Nikeo,
I have pasted code to childs functions.php file.
It looked like this. Just added a single id to array.
But it didnt work. I still get the original page.
Thanks.
<?php
function add_custom_sections ( $args ) {
//set up global vars with the section parameters
global $section_params;
$defaults = array(
‘ids’ => array(21) ,
oerdem,
1. When you post code, please use backticks, otherwise the forum code will try to interpret your code. (Use the code button if your keyboard doesn’t have a backtick.)
2. The $args
parameter in the add_custom_sections() function needs to be defined. See Nicolas’s example, where he defines them as follows:
$my_sections_args = array(
'ids' => array( 1 , 45 , 47 ),
'blur' => 0,
'background' => array( 1 => "randcolors", 45 => 'thumb' , 47 => 'randimages' ),//'randcolors'
'context' => 'home',
'hook' => '__before_main_wrapper',
'apply_shadow' => false,
'layout' => 'boxed',
);
add_custom_sections ( $my_sections_args );
Hello,
This is absolutely awesome!
Well, if you have pasted the whole snippet code into your functions.php and used the @electricfeet example of implementation, it should work fine.
It works now, thank you! 🙂
Great 🙂 Would you mind sharing an url of the result?
Thanks
That looks very impressing, my only question is, how do you get the “This is a title” and the clickeable button?
I’d share it gladly, but I’m building the site locally on my computer and it’s not yet ready. But I’ve uploaded a screenshot here.