Wordpress help please!

by 14 replies
17
Hello

Really could do with some help.

Setting up a WordPress, and im stuck!!

im adding pages but putting the same info in for all pages (boring)

I want to set up a default page template so when i create a new page the text i need is already there in the same places for all pages.

This is what I mean:
discountsrus[dot]co[dot]uk/loans-rus/?page_id=30

Every thing in bold, such as APR Loan Amount etc... I want the text already there so i can just input the info needed.

If you have a look at other pages i can not get the formatting right so its the same place in all pages.

How could i do this? Is it possible to do?

Thanks
#website design #wordpress
  • I'm not 100% sure if this is the easiest way, but it might help.

    Open up notepad and copy and paste this at the top.

    <?php /* Template Name: template name here */ ?>

    Then, copy your entire page code, whether html or php, below that.

    Save that as a .php file.

    Upload that file into your wp-content/themes/ folder under the theme that you're using.

    Then, when you create a new page, you will see a field titled template (somewhere under publish). Click the arrow and select your new theme that you just created.

    Now, since each page is different, what I do is just create a different template for each one. I just edit what text I want changed in my code, rename the template, and then upload it. With this, the format should stay the same, as long as you just change the text for each seperate template you make.

    Hope that makes sense, but if I'm understanding you correct, it should be a quick easy way to achieve what you're wanting.

    Let me know if you have any questions.
    • [1] reply

    • Thanks for the help

      im trying your way now.

      What should i name the php file?

      Anything?
      • [1] reply
  • You guys are both wrong in your approach!

    Although you can have custom Page templates... that will NOT solve the question in the OP.

    You should look into adding custom post types AND custom Write Post panel for them in the admin.
  • It can be anything.

    Like I said, it's probably not the most efficient way, but it works for me. One thing I forgot to mention. If you want your full wordpress theme to show up on these pages, like header, footer, sidebar, widgets, etc. There is a code to call all these functions. you would include


    get_header
    get_sidebar

    within the php code at the top.
    • [ 1 ] Thanks
  • Just in case you guys missed this... it will NOT work with templates.

    If I understood it correctly, the OP needs to create many, many Pages that have the same fields (or something similar).

    With the very bad solution suggested by Eric the OP would need to create a Page template for every Page - WTF, that's even worse than typing the same stuff into each Page!

    No, templates is NOT the way to do it.
    You need a custom Write subpanel.
    • [1] reply

    • No this is a great idea, simple and great!

      I have my pages all in html txt files so i could just copy and paste!
      • [ 1 ] Thanks
      • [1] reply
  • GOT IT!!

    Code:
    <?php /* Template Name:template */ ?> 
    
    <?php get_template_part('content', 'before'); ?>
    
    <b>Template test</b>
    
    <?php get_template_part('content', 'after'); ?>
    Thanks so much for your help! been trying this for DAYS!!
  • <?php
    /*
    Template Name: Cover Page
    */
    ?>

    <?php get_header(); ?>
    Here's my cover page!
    <?php get_footer(); ?>

    You need to put the code inside <?php ?> Try messing around with this code... and as you'll see, you can use the same format to call your sidebar.
  • Oh, just saw your post. Glad you figured it out. I don't know if it's the best idea or not, but I'm the same way, I just copy and paste my html underneath the .php and it takes a whole 2-3 minutes per page to set up.
    • [ 1 ] Thanks

Next Topics on Trending Feed