ansonphong / postworld

Wordpress Theme Development Framework
GNU General Public License v2.0
7 stars 0 forks source link

Using Single Wordpress Template for testing #54

Closed michelhabib closed 10 years ago

michelhabib commented 10 years ago

Hi Phong, i'd like us to use a single template for sharing sample code and testing it. I am currently using the search-results.php template (and it's accompanying header and footer files), i built this with a menu and route mechanism to easily use it as a test-bed for our directive testing.

Could you please help me find the errors that are showing in your environment for the search-results template?

Many of the errors that we are both facing when testing now are related to the use of different templates, so i am hoping that this way we can minimize the errors and finding them quickly by replicating and sharing the same environment.

Also, If you have a different approach, please let me know.

i'd like to sort this out before looking into the other errors related to using the directives already built.

michelhabib commented 10 years ago

Reference to your last email, i am now using postworld_includes(), that's a great idea, but we still need to unify the template.

ansonphong commented 10 years ago

How about we make a separate repo called postworld-theme - you can push your /wp-content/themes/postworld-theme directory to that repo and then we can be looking at the same environment.

https://github.com/phongmedia/postworld-theme

michelhabib commented 10 years ago

OK, here is what i did, i replicated twenty-twelve, added my 3 files theme to it, and pushed it to the new repo. this should be equivalent to adding the 3 files from dev/theme to twenty-twelve.

To troubleshoot, switch to the postworld-theme, F12 in chrome, let me know what looks suspicious in Network or console tabs.

ansonphong commented 10 years ago

OK - I installed the theme, though it looked no different from twenty twelve. So I renamed header-postworld.php to header.php and footer-postworld.php to footer.php so that Wordpress actually uses them rending the page, but it looks like this, and there's no Postworld functionality.

image

Any ideas?

michelhabib commented 10 years ago

no actually, you should keep the header and footer file names as is, i am calling them from search-results this way, it's a special wordpress call

<? get_header('postworld'); ?>
<div ng-app='postworld' data-nonce="<?php echo wp_create_nonce("postworld_nonce");?>" >
    <ng-view></ng-view>
</div>

<?php get_footer('postworld'); ?>

you will need to create a page that uses the search results template. Do you mind hooking me with teamviewer for 10 minutes to look at it myself? this is driving me crazy :)

ansonphong commented 10 years ago

sure, let me configure it like you suggested and I"ll have a look at it.

phong

On Mon, Oct 21, 2013 at 4:20 PM, michelhabib notifications@github.comwrote:

no actually, you should keep the header and footer file names as is, i am calling them from search-results this way, it's a special wordpress call

<? get_header('postworld'); ?><div ng-app='postworld' data-nonce="<?php echo wp_create_nonce("postworld_nonce");?>" >

<?php get_footer('postworld'); ?>

you will need to create a page that uses the search results template. Do you mind hooking me with teamviewer for 10 minutes to look at it myself? this is driving me crazy :)

— Reply to this email directly or view it on GitHubhttps://github.com/phongmedia/postworld/issues/54#issuecomment-26765554 .

ansonphong commented 10 years ago

ok now I got it working - I didn't realize I had to set the template to search-results. :)

phong

On Mon, Oct 21, 2013 at 4:27 PM, phong asun@phong.com wrote:

sure, let me configure it like you suggested and I"ll have a look at it.

phong

On Mon, Oct 21, 2013 at 4:20 PM, michelhabib notifications@github.comwrote:

no actually, you should keep the header and footer file names as is, i am calling them from search-results this way, it's a special wordpress call

<? get_header('postworld'); ?><div ng-app='postworld' data-nonce="<?php echo wp_create_nonce("postworld_nonce");?>" >

<?php get_footer('postworld'); ?>

you will need to create a page that uses the search results template. Do you mind hooking me with teamviewer for 10 minutes to look at it myself? this is driving me crazy :)

— Reply to this email directly or view it on GitHubhttps://github.com/phongmedia/postworld/issues/54#issuecomment-26765554 .

ansonphong commented 10 years ago

ok, now if you pull the latest version of* /themes/postworld-theme* and /plugins/postworld* you will see my progress with the edit-form controller (I added to the menu & route) at /#/edit-post/ * phong

On Mon, Oct 21, 2013 at 4:31 PM, phong asun@phong.com wrote:

ok now I got it working - I didn't realize I had to set the template to search-results. :)

phong

On Mon, Oct 21, 2013 at 4:27 PM, phong asun@phong.com wrote:

sure, let me configure it like you suggested and I"ll have a look at it.

phong

On Mon, Oct 21, 2013 at 4:20 PM, michelhabib notifications@github.comwrote:

no actually, you should keep the header and footer file names as is, i am calling them from search-results this way, it's a special wordpress call

<? get_header('postworld'); ?><div ng-app='postworld' data-nonce="<?php echo wp_create_nonce("postworld_nonce");?>" >

<?php get_footer('postworld'); ?>

you will need to create a page that uses the search results template. Do you mind hooking me with teamviewer for 10 minutes to look at it myself? this is driving me crazy :)

— Reply to this email directly or view it on GitHubhttps://github.com/phongmedia/postworld/issues/54#issuecomment-26765554 .

michelhabib commented 10 years ago

i guess this should be closed already

ansonphong commented 10 years ago

Oh yea thanks for closing that - feel free to do that anytime on old threads.