lstewartiii
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Networking WordPress
In reply to: Aggregating Recent Posts to Parent Site in Multisite Install@g0dlike Just to clarify what your instructions were
Put this into latest_posts.php and, in functions.php in your theme folder add on top require(‘latest_posts.php’);
YOu want us to
- Create a file called latest_post.php and past the code above into it
- Save the file as wp-content/themes/yourtheme/functions/latest_post.php/
- open wp-content/themes/yourtheme/functions.php and add
require('latest_posts.php');
or in my case require_once($functions_path . 'latest_posts.php'); // latestposts
I tried your code, first with the require as you had it and this is the error it gave:
Warning: main(latest_posts.php) [function.main]: failed to open stream: No such file or directory in /nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions.php on line 13 Warning: main(latest_posts.php) [function.main]: failed to open stream: No such file or directory in /nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions.php on line 13 Fatal error: main() [function.require]: Failed opening required 'latest_posts.php' (include_path='.:/usr/local/php-4.4.8-1/share/pear') in /nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions.php on line 13
and when I tried it with the path corrected, I got this error
Warning: main(/nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions/latest_posts.php) [function.main]: failed to open stream: No such file or directory in /nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions.php on line 21 Fatal error: main() [function.require]: Failed opening required '/nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions/latest_posts.php' (include_path='.:/usr/local/php-4.4.8-1/share/pear') in /nfs/c07/h03/mnt/103866/domains/mydomain.com/html/wp-content/themes/mytheme/functions.php on line 21
If I messed up somewhere please clarify for me. And added info; i changed the names of my domain and theme for security reason but the errors are still the same.
Viewing 1 replies (of 1 total)