The news page listing to all the news articles does not return the correct path.
When url is to /news/ without any specific category, the returned path is to /page/2 instead of /news/2.
I was going to try to insert some of the html from the page, but it seems to get messed up on preview, so you can go look yourself.
The problem appears to be in the way a filter is applied. Digging deeper, the function getNewsPathNav($page) returns the path used above.
return zp_apply_filter('getLink', rewrite_path($rewrite, $plain), 'news.php', $page);
where parameter are defined as:
$page=1
$rewrite="/news/2"
$plain="index.php?p=news&page=2"
rewrite_path($rewrite, $plain)="/news/2/"
A link to the website where this is deployed can be found at http://www.hippiehollow.net/news/
I have installed Zenphoto 1.5.7
I suspect that it may be a similiar problem with the All News link in the sidebar.
I do think this is something on your site as I cannot reproduce this (prime example on our own site).
Since you are not using a standard theme please try if that also happens with the plain Zenpage theme. If it doesn't it is your custom theme somehow. If it also happens there might be some other issue specific to your site. For example if your other site's componenst also use htaccess or there is a parent on the may intefere.
You are correct. The problem has something to do with the theme. I started new with copy of the Zenpage theme and reinserted the modifications. Now the news links appear to be working properly. I do not know what condition was causing the problem, but I will pay attention to the behavior of the news links as I apply any future changes.
htaccess file version 1.4.12, so that is not the problem. This was a new install, my first time to use Zenphoto. I am thinking that if there is new version coming soon, I might not want to spend too more time with this version until the new release.
Good you found the general cause. What modifications did you apply? I cannot think of any changes at the moment causing these links to change unless you override the filter with something else.
Yes, next version will be 1.5.8 and no changes in this area. Theme things should not be affected by it.
the only modifications are to what you see, graphics and text, custom css to modify the look, removed some titles and replaced, positioning of existing elements on the page. Nothing major at all.
I did play around with using the codeblock(2) to insert style overrides on only a few pages. If I placed
Yes, those modifications should not change the links, so it must be something else…
A few quick notes:
If you use codeblock as they are in the Zenpage theme using would cause invalid HTML. is only valid in the `` of a HTML page. Best is to modify the theme's css file or add your own extra css file. (which is why it is cleared as it is not an allowed element here)
Also the text for the news is only formatted with 0A linebreaks. I use the codeblock(1) to echo nl2br( getNewsContent()); instead of using the printnewscontent() that is standard.
"get" functions generally just return plain data while especially in this case the "print" version does a lot more for output.
Enable the tinyMCE editor to get actual HTML formatting of text. It actually should be enabled by default. Without it the text is not really formatted at all excecpt line breaks or what you add manually as extra HTML.
I have only been using Zenphoto for a couple of weeks. I try to search for examples but typically end up doing from the best of my simple abilities to get my ideas to work. I regularly go back and redo when I find a better way. I see where the 'theme_head' filter is applied at the top of the
But I might dive into registering filters later after I get more familiar with Zenphoto.
We cannot give concrete examples for everything as all is just PHP. If you haven't I suggest to read the theming tutorial on the user guide section of our site for the basics.
Official themes don't use these filters (actually unknown reasons) but a lot plugins do. Apply directly in within head is of course not totally wrong but using the filter allows to do that without editing the theme itself.
Filters can be applied with priority parameter to define the load order.
You find the generel documentation from the code source here:
https://docs.zenphoto.org
But you need some PHP knowledge to understand all this.