• bellablack

    (@bellablack)


    I am not sure if this is the place to ask, but here it is. I am not good with coding and such so forgive me if I sound dumb. I was just wondering if there is a way for me to have one sidebar file for all my themes that way when I need to edit something I only have to edit one file instead of 5 different ones for all my themes. My side bar is pretty much the same for all my themes except for maybe the size (wxh) but other then that they all have the same info. I use my wordpress for more of a site then a blog so this would be easier for me. So If there was a way for everything except the size info could be held in one file instead of 5 that would be awesome. I am not sure how to do this so if someone could help I would appreciate it! Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • resiny

    (@resiny)

    hm. There might be a way, but it’s beyond me.

    Anyone?

    Thread Starter bellablack

    (@bellablack)

    thanks resiny. silly.

    silkjaer

    (@silkjaer)

    you can do a manual php include instead of using the standard sidebar include call.. ??

    Thread Starter bellablack

    (@bellablack)

    how do i do that? remember i don’t know?! what would the coding look like. this is my sidebar.php file:

    [moderated the long code!-
    use a pastebin service]

    moshu

    (@moshu)

    Or, if you are 100% sure the content part of those sidebars is the same…

    you can just make a file where you put

    search tag
    archive tag
    category tag
    meta etc.

    and include that one in every sidebar.php – in between the div tags that define the layout.
    I’ve never tried but I think it should work.

    Thread Starter bellablack

    (@bellablack)

    so what would the exact code look like? i don’t know how to write it?!

    moshu

    (@moshu)

    Unless somebody sees all the five sidebar files… it’s impossible to tell.

    Thread Starter bellablack

    (@bellablack)

    ok all the sidebar files are exactly the same (view here: https://pastebin.com/582717 )except for line 5 which is the size.

    Thread Starter bellablack

    (@bellablack)

    anymore help?!

    moshu

    (@moshu)

    That’s not the usual theme structure, for sure…
    So, no, no help: it is too much risk involved in this kind of “remote” redesigning/restructuring a theme.

    I for one wouldn’t feel comfortable giving any further remote advice (on the top of what I did above) if the user has no basic coding knowledge. Sorry. It would break her blog 100 times and I don’t want to be blamed for that.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Sidebar help’ is closed to new replies.