ansonphong / postworld

Wordpress Theme Development Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Single Wordpress Template for testing

michelhabib opened this issue · comments

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.

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

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

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.

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?

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 :)

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

" >

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//issues/54#issuecomment-26765554
.

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

" >

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//issues/54#issuecomment-26765554
.

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

" >

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//issues/54#issuecomment-26765554
.

i guess this should be closed already

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