WPIntell

Source evidence

Custom page templates

WPtouch – Make your WordPress Website Mobile-Friendly · support · 2024-04-23T11:13:00+00:00

complaintsentiment
mediumseverity
0.86relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 25 rows with source links

24.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
tippers unresolved
I have created some custom page templates which work for my desktop site but the mobile site (wptouch) isn’t displaying them. Instead it shows the content on the page rather than using the custom template php content. Does the free version recognise custom page templates? no, wpt uses its own theme, but assuming u can open a shell, link your c.p.t.s into it & they will be recognized: ln -s ~/www/wp-content/themes/yourtheme/cpt.php ~/www/wp-content/plugins/wptouch/themes/bauhaus/default Perfect, thank you. I think I’d previously copied the php files into the wptouch-data directory so thank you for pointing me to the right place and using symlinks is much better. One further question, in the page template php file, I have a link to a custom css file in my child theme directory. When I view the page from a mobile, the css file isn’t loaded and styling isn’t applied. Any ideas please? I had to add the following to my child theme functions.php function wpse_enqueue_page_template_styles() { if ( is_page_template( 'mytemplate.php' )) { wp_enqueue_style( 'page-template', get_stylesheet_directory_uri() . '/mystyle.css' ); } } add_action( 'wp_enqueue_scripts', 'wpse_enqueue_page_template_styles' ); So I then added the same code to the functions.php in /wp-content/plugins/wptouch/themes/bauhaus/default. Initially it couldn’t find mystyle.css (404) so I added a symlink for mystyle.css but it then complained that it didn’t have permission (403) – which it did. The workaround was remove the symlink and to copy the css file in to the bauhaus/default directory. yes: link the css into the wpt them directory as well…and remember that depending on the extent of any wpt update (if the them dir is replaced rather than writtten into) the links will have to be restored…i have a crontab script that runs daily

Comments

4 shown
airdrummer 2024-04-23T13:11:00+00:00

no, wpt uses its own theme, but assuming u can open a shell, link your c.p.t.s into it & they will be recognized: ln -s ~/www/wp-content/themes/yourtheme/cpt.php ~/www/wp-content/plugins/wptouch/themes/bauhaus/default

tippers 2024-04-23T15:23:00+00:00

Perfect, thank you. I think I’d previously copied the php files into the wptouch-data directory so thank you for pointing me to the right place and using symlinks is much better. One further question, in the page template php file, I have a link to a custom css file in my child theme directory. When I view the page from a mobile, the css file isn’t loaded and styling isn’t applied. Any ideas please?

tippers 2024-04-23T15:58:00+00:00

I had to add the following to my child theme functions.php function wpse_enqueue_page_template_styles() { if ( is_page_template( 'mytemplate.php' )) { wp_enqueue_style( 'page-template', get_stylesheet_directory_uri() . '/mystyle.css' ); } } add_action( 'wp_enqueue_scripts', 'wpse_enqueue_page_template_styles' ); So I then added the same code to the functions.php in /wp-content/plugins/wptouch/themes/bauhaus/default. Initially it couldn’t find mystyle.css (404) so I added a symlink for mystyle.css but it then complained that it didn’t have permission (403) – which it did. The workaround was remove the symlink and to copy the css file in to the bauhaus/default directory.

airdrummer 2024-04-23T15:58:00+00:00

yes: link the css into the wpt them directory as well…and remember that depending on the extent of any wpt update (if the them dir is replaced rather than writtten into) the links will have to be restored…i have a crontab script that runs daily