Customizing individual pages in Wordpress

Asked

Viewed 11,594 times

2

Wordpress offers the option to customize the Live Themes via the Customize button. However, I would like to have this same live option to customize the pages individually, without having to be equal to the theme. Example: change the background, font color and among other things you want.

In Wordpress has this solution, or plugin?

I tried to use by typing the address: http://dominio.com/wp/wp-admin/customize.php?url= http://dominio.com/wp/pagina-exemplo

It even opens for editing, but changes the whole theme.

Tela de Personalização

  • Excellent idea!

  • Look for the theme builder plugin in real time, ( Live Composer ). Just look about it. I believe it will help you.

1 answer

3

There is not yet this type of editing smarter implemented natively in Wordpress, but I believe that within a short time exists.

When you use the customizator to customize colors for example, is insert in the HTML code of your template, one or more tags style with the ready codes based on the options you defined in the editor.

Seeing the theme used in the print of your question, I see that is the Twenty Twelve, I used it in localhost also to check better and give you the specific answer for your case, so come on, this theme generates a tag style for the header color and one for the blog background more or less like this in HTML:

<style type="text/css" id="twentytwelve-header-css">.....</style>
<style type="text/css" id="custom-background-css">.....</style>

Within the tags style contains the CSS code you set up through the editor, after you set it up, open your Wordpress on localhost and see the source code and search for these snippets I mentioned and you will find them.

Since you want to set specific header and background image colors for pages and publications, this can be done through Wordpress as is_page, is_single, is_category, is_tag among others that serve to perform checks on the current page.

Below is an example code I tested on localhost and had to create 3 pages (sample page, contact, about) to be able to see the result and is working correctly, the code is small and only contains the options already native of this theme in question, but if you have knowledge of CSS, you can customize everything you want, recommend that you insert it below the code <?php wp_head(); ?> in the archive header.php of your template:

<?php if ( is_page( 'pagina-de-exemplo' ) ) { ?>

<style type="text/css">

.site-header h1 a, .site-header h2 { color: #dd3333; }
body.custom-background { background-color: #3333dd; }

</style>

<?php } elseif ( is_page( 'contato' ) ) { ?>

<style type="text/css">

.site-header h1 a, .site-header h2 { color: #33dd33; }
body.custom-background { background-color: #dd3333; }

</style>

<?php } elseif ( is_page( 'sobre' ) ) { ?>

<style type="text/css">

.site-header h1 a, .site-header h2 { color: #3333dd; }
body.custom-background { background-color: #33dd33; }

</style>

<?php } ?>

- Tags Conditional

Browser other questions tagged

You are not signed in. Login or sign up in order to post.