Redux Framework Part two.

Hi, who is eager to know about redux framework , this post is for you. before following this post you must see the earlier post named get started with redux framework.

Now let’s start, after installing redux framework in you theme according to the previous post,  go to you [sample-config.php] file.

Now scroll bottom to the file and see there is a comment, writing (START SECTIONS) and below the comment see another comment (START Basic Fields), Right below the comment see there is a section writing in php like the picture below.

Screenshot_9

After the section there a lot of sections. You may be do not need all the sections. So just erase all the sections or keep only one section to follow and make sections how much and how much category you need. like the code below.


Redux::setSection( $opt_name, array(
'title' => 'About Options',
'icon' => 'el el-adult',
'fields' => array(
array(
'id' => 'about-heading',
'type' => 'text',
'title' => 'About section Heading',
'desc' =>'Add The Headig of bout section',
'default' => 'ABOUT ME',
),

)
) );

Than see on your dashboard, there is a new option on option menu has been created named [About Options] and a field has been created named [About section Heading] where you will see a text field. here you will write your dynamic title where you call the option.

Now you need to show the title on your theme. So, go to your theme file in which file you want to show like index.php or about.php file.

Before doing this see on the top of the [sample-config.php] there is a variable like this image,

Screenshot_12

This is your option name you need to make global on your theme file. You can change the name from (redux_demo) to any name.

Now make Global in your theme file [index.php] on the top into the body tag like this,
<blockquote>

<?php global $redux_demo; ?>

You have done making global in a file. Remember you have to make global at least one time in a file where you want to apply redux options.

Now call the option field you have created named [About section Heading] . go to a Title on the file where you made global the redux option variable. like this,

<h2>About Me</h2>

Now add the field id of your redux option here, like this,

<h2><?php echo $redux_demo['about-heading']; ?></h2>

Now you have done. save it and go to dashboard and refresh the theme option and save changes. Now go to the theme and refresh it and see the amazing changes.

I’ll come with new post next time,

Enjoy and keep learning.


17 Comments

  • see page

    March 12, 2017

    Have you ever thought about writing an e-book or guest authoring on other websites? I have a blog centered on the same topics you discuss and would really like to have you share some stories/information. I know my subscribers would appreciate your work. If you’re even remotely interested, feel free to shoot me an email.|

    Reply
  • House Renovation

    March 12, 2017

    I got what you intend, regards for putting up.Woh I am happy to find this website through google. “Money is the most egalitarian force in society. It confers power on whoever holds it.” by Roger Starr.

    Reply
  • Health & Fitness

    March 20, 2017

    You are a very bright individual!

    Reply
  • inquiry

    March 21, 2017

    Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how could we communicate?|

    Reply
  • Pets

    March 21, 2017

    I like what you guys are up also. Such clever work and reporting! Carry on the excellent works guys I¡¦ve incorporated you guys to my blogroll. I think it will improve the value of my web site 🙂

    Reply
  • Travel & Leisure

    March 21, 2017

    Thanks for sharing superb informations. Your site is very cool. I’m impressed by the details that you¡¦ve on this web site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found simply the info I already searched everywhere and simply could not come across. What a perfect web site.

    Reply
  • Baby & Parenting

    March 21, 2017

    I think other web site proprietors should take this site as an model, very clean and fantastic user friendly style and design, as well as the content. You are an expert in this topic!

    Reply
  • Health & Fitness

    March 21, 2017

    Hello. fantastic job. I did not imagine this. This is a splendid story. Thanks!

    Reply
  • Business

    March 21, 2017

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how can we communicate?

    Reply
  • Law & Legal

    March 21, 2017

    I¡¦m not certain where you’re getting your info, but great topic. I must spend some time studying more or understanding more. Thank you for fantastic info I used to be looking for this information for my mission.

    Reply
  • Travel & Leisure

    March 21, 2017

    Hello there, I found your site via Google even as searching for a similar matter, your site got here up, it appears to be like good. I’ve bookmarked it in my google bookmarks.

    Reply
  • Law & Legal

    March 21, 2017

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!

    Reply
  • Travel & Hotel

    March 21, 2017

    Hello there, just became aware of your blog through Google, and found that it is truly informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. A lot of people will be benefited from your writing. Cheers!

    Reply
  • Law & Legal

    March 21, 2017

    Very nice info and right to the point. I don’t know if this is actually the best place to ask but do you folks have any ideea where to get some professional writers? Thanks in advance 🙂

    Reply
  • Pets

    March 21, 2017

    Great blog here! Also your website loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my site loaded up as fast as yours lol

    Reply
  • automotive

    March 22, 2017

    I delight in, result in I discovered just what I used to be looking for. You have ended my four day lengthy hunt! God Bless you man. Have a nice day. Bye

    Reply
  • Education

    March 22, 2017

    Unquestionably believe that which you stated. Your favorite reason appeared to be on the internet the easiest thing to be aware of. I say to you, I certainly get annoyed while people think about worries that they just do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks

    Reply

Leave a Reply