Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sidebar issues
#1
Hello i was able to create my own theme and cutomise it but my question is is there a way i can have different side bar content on different pages that i create. It would be great if the sidebar content is created with the page its self.

http://star-leo.com/Previews/ign-cms/

Is an example of my home page but i want to have different content on my other pages that i create within
Reply
#2
Hi Welcome to the forums.

Just create different template files for each sidebar configuration that your require.

Then just assign the different template to whatever pages you want.

e.g. copy your template.php file to template2.php
change the sidebar code, then on the pages that you want that configuration change the template
under "page options" to template2.php

M
My Github Repos: Github
Website: DigiMute
Reply
#3
thank you but then if i have many pages i would have to create alot of temp files to show some content? and then what happens when i easily want to edit the content?

Is there away i can create sub content for a page like a small title and some small content for that page then i could call it in my sidebar file ?
Reply
#4
leonku Wrote:thank you but then if i have many pages i would have to create alot of temp files to show some content? and then what happens when i easily want to edit the content?

Is there away i can create sub content for a page like a small title and some small content for that page then i could call it in my sidebar file ?

You can add a custom field 'sidebar' to your page using the I18N Custom Fields plugin and then add the it to the template using
Code:
<?php get_custom_field('sidebar'); ?>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#5
mvlcek Wrote:<?php get_custom_field('sidebar'); ?>


thank you am almost getting there know how do i call the name of the custom field and also have it specifically call a certain page for a specific page so that it only appears where its supposed to appear and it doesnt appear on pages that i did not add a custom field.

Example 1 :

http://star-leo.com/Previews/ign-cms/ind...hat-is-lis

Example 2: http://star-leo.com/Previews/ign-cms/ind...-in-uganda (no custom field attached and it shows an empty box )
Reply
#6
this how far i am so far <?php return_custom_field($name, $echo=true); ?> but the label doesnt appear i need it to appear and also do away with the section not appearing on pages that i didnt assign a custom field .
Reply




Users browsing this thread: 1 Guest(s)