ljmblue
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: If this file were writable you could edit it.Here’s how I solved this issue (assumes shell access):
1. create a new group:
$ addgroup wp-theme-editor
2. change the group of the theme files and make them group writable:
$ cd <theme-directory>
$ chgrp wp-theme-editor *
$ chmod g+w *
3. add apache user into the new group:
$ usermod -a -G wp-theme-editor www-data
4. restart apache (otherwise the apache process doesn’t knows that it’s it in the new group)
$ /etc/init.d/apache restartForum: Fixing WordPress
In reply to: Putting PHP on a WordPress “Page”Using parentheses with require_once is optional.
Forum: Fixing WordPress
In reply to: Putting PHP on a WordPress “Page”Hm, a code sample might better illustrate my question.
Here’s an abbreviated bit of the template:
<?php require_once 'fooversion.inc.php'; ?> <?php the_content(); ?> <?php edit_post_link('Edit this entry.' . get_foo_version(), '<p>', '</p>'); ?>
and then the page appears (ignoring the sidebar):
header
content part
content part
Edit this entry 1.2.3So I can make the version number appear in the post link. But I want the version number to appear inside the page content like this:
header
content part
Version 1.2.3
content part
Edit this entryIn other words, I want the version number to appear within the page content and this is where I get stuck.
I am getting the feeling that the only way to get this version number into the page content is with a php plugin or at least something like the Enzymes plugin.
Forum: Fixing WordPress
In reply to: Putting PHP on a WordPress “Page”I’ve got a page where I want a frequently-changing version number to appear. I’ve created a page template and I can get at the version number in the template using require_once, but I’m stumped re: how to get this version number from the page template into the page content.
If using a php plugin is the right way to do it then fine, just thought I’d ask if there was a better way.