• Resolved brinded

    (@brinded)


    homepage has several divs, four of which have content which is common to all pages. (eg. navigation menu)

    ideally, i’d like to be able to see changes made to these homepage divs reflected on all pages without having to copy and paste.

    i’ve searched posts and noticed there are plug-ins which can do this, but i’d really like to know if there’s a method using CSS?

    any suggestions?

    thanks,

    stuckwithtechnology.com

Viewing 12 replies - 1 through 12 (of 12 total)
  • ronangelo

    (@ronangelo)

    What kind of changes? if it’s just changes on the design per page then yes that can be done with CSS.

    Thread Starter brinded

    (@brinded)

    hi ronangelo, thanks for response.

    content changes.

    for example, if i change the menu ul on homepage, i’d like new menu to appear automatically on other pages without copying and pasting 6 times.

    ronangelo

    (@ronangelo)

    Can you post your url? I still can’t understand what kind of changes you want exactly?

    for example, if i change the menu ul on homepage, i’d like new menu to appear automatically on other pages without copying and pasting 6 times.

    Change the menu ul into what?
    Menus on homepage normally show exactly the same on every page. Why would you need to copy? Can you give more details?

    Thread Starter brinded

    (@brinded)

    stuckwithtechnology.com

    ronangelo

    (@ronangelo)

    how silly of me… I failed to see the url on the first post 🙂
    Anyway, the website doesn’t seem to load on my browser but I managed to get a screenshot of it.

    Codes inserted on the header.php and index.php normally gets executed every time your site loads so adding the menu there should make it appear on all the pages.

    I’m guessing that you’re adding the menus through posts and pages and not on the theme templates?

    Thread Starter brinded

    (@brinded)

    hi ronangelo,

    I’m not using theme header – it was easier to get the layout i wanted without them.

    Not using posts either – static pages only.

    theme is child of Coraline.

    ronangelo

    (@ronangelo)

    The design you have now is very different from the default look of coraline.

    I’m not using theme header – it was easier to get the layout i wanted without them.

    Well I don’t see any way around it. You either copy the codes for every post(you mentioned that there’s only 6 pages anyway) Or insert the menu codes on either the header.php or the index.php and then redesign it again to achieve the look you want.

    Thread Starter brinded

    (@brinded)

    ok – thanks for trying – much appreciated.

    ronangelo

    (@ronangelo)

    Aww I feel bad for not resolving this. Maybe there’s still hope if you don’t want to copy over and over again.

    You can use a function to add the codes before the posts but you still have to position them one time through css.

    You can add this on the functions.php (preferably on a child theme)

    function added_menu($content) {
       $content.= 'add menu codes here';
       return $content;
    }
    add_filter ('the_content', 'added_menu');

    WPyogi

    (@wpyogi)

    @brinded – are you not using any header.php file? If not, where is the head section of your pages?

    Thread Starter brinded

    (@brinded)

    ok – thanks – i’ll give a try.

    but you’re right, there are only half-a-dozen pages, so it’s not too difficult to copy/paste.

    i was just looking for a more elegant way of doing things and enjoying learning!

    anyway, thanks again. much appreciated.

    Thread Starter brinded

    (@brinded)

    Hi WPyogi,

    I wanted to have a multi-colored header (different tones for each letter in a word), and the only way I could do that was to create a div (named fake-header) and then html the rest.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘div content common to multiple pages’ is closed to new replies.