1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Convert regular css to a Wordpress one for CPA mobile marketing

Discussion in 'Mobile Marketing' started by MaverickonRoids, Jun 13, 2012.

  1. MaverickonRoids

    MaverickonRoids Power Member

    Joined:
    Jun 3, 2012
    Messages:
    783
    Likes Received:
    439
    Location:
    Rep Score: Infinity
    I usually don't come here to ask for advice because I think people should try to figure things out for themselves, but I tried everything with no success.

    I was given a zip file from my CPA network, which deals with mobile phones only, that I think was designed by a program called Dreamweaver, or Dream something. Well, I don't want to sound like a noob to them, so I hope I can get some help here with my situation. The problem is to take that file, and convert it to make it Wordpress compatible.

    That is what I use exclusively because it's really simple, and perfect for a non-coder like me. So having it converted into Wordpress stuff would REALLY be appreciated, so I can get in on a supposed hot CPA offer for mobiles. Without this being converted, I really don't know how else to pull this off. Like I said, I am not a coder, don't have the Dream software that they used, and after looking at some tuts online, I still can't get how to substitute this and that, and where to stick it.

    So I hope someone can either offer me a solution via a plugin that can do this automatically, or a DROP DEAD EASY WAY to get this converted. Hopefully ASAP.

    Much appreciated.
     
  2. srb888

    srb888 Elite Member

    Joined:
    Jul 30, 2008
    Messages:
    3,260
    Likes Received:
    5,067
    Gender:
    Male
    Occupation:
    WebzSurfer
    Location:
    Sun, Mon, Tue, WTF, Sat!!! :)
    It can easily be done by making the CSS site a WP template. Then import the template on a new WP page. Then make that WP page your home page.

    I don't know about other methods to convert a css/html site to Wordpress to achieve the same results though, but this method works for me.

    1.
    First, rename all the images, scripts, styles, or whatever folders you have received (for the CSS template/site) to something like images2, scripts2, etc. so that their content do not clash with the existing Wordpress files.

    2.
    Copy those renamed folders to the Wordpress folder.

    3.
    Go to your current theme's folder (the theme that you'll use for the new CSS-to-WP project. The path would be something like this (I'm using the localhost to test your problem) >> <yoursite>\wp-content\themes\<YourCurrentTheme>\

    4.
    In that folder, copy the html file that you've received and rename it with a php extension.

    5.
    Open this new php file in TextPad (I use it) or Notepad, or any other good text editing tool.

    6.
    On top of that php file, above the original html code, simply insert these lines and then save the file (remember to use the php extension in the file name, and "Save As Type: All files [*.*]" option) : >>

    Code:
    <? php
    /*
    Template Name: AnyName
    */
    ?>
    (Note: Give a suitable name to identify it's purpose but keep it short...)
    This template file will be seen in the Template drop-down box in the sidebar on the "Add New" menu-item under the "Pages" menu in Wordpress. If you don't see the "Template" option in the sidebar, simply change the theme to a different one, and then change it back to your existing one... you'll hopefully see the Template option now. It's a WP bug... If your php file, it's top php code, it's location, and the necessary scripts/etc folders are placed correctly, this will be a smooth and successful operation. :)

    7.
    In WP admin, create a New Page and give it an appropriate title, select the new template name from the Template box in the sidebar, and then save the file as is. Now add the original html template in the HTML editor of WP... (Sometimes when the "Visual" editor is opened, that breaks the html code so you'll have to find an appropriate plugin that prevents the html code from breaking. There are many such free plugins and you may choose the one that works well for you. Try using one such plugin at a time and select the one which helps.)

    8.
    You may now select this Page as your Home Page by doing this >>
    "Settings" menu-item > "Reading" option > "Front page displays" > Select "Static Page" option, and select the newly created Page from the "Front Page:" option.


    Now, every time any site-visitor opens the site, your new page will be displayed as the home page.

    If you wish to make changes to the php file, that's another story, but it can be done - even by a newbie like you, if you go to youtube and find a suitable video explaining how to do it -- and every thing that's mentioned above! :)

    Of course, check, double-check, recheck every thing before going "live"!
    HTH

    P.S.: If you're able to do it well and fast, I'll feel my little effort is well-rewarded! :)


    Important:
    I failed to mention that in the php file, you'll have to rename all the /script, /images to the newly changed folder names... for example, if you have renamed the folder /images to /images2 then find all instances of /images in your php file and change those to /images2... and so on. Got it? Sorry for failing to mention this earlier... :) Hopefully every thing should work well now.


    P.P.S:
    The above method will not display your WP header and your logo at the top. To do that, you'll need another method which can be a bit too difficult you to perform at this stage. But it can also be done, i.e., display your blog details above the cpa template...)
     
    Last edited: Jun 16, 2012