Jump to content
Sign in to follow this  
aequator

read more tags disappeared

Recommended Posts

aequator

Hi there guys, I'm setting up platform pro at aequator.goedgehost.nl. Since I've redirected the homepage to a static page, all read more links have disappeared, both from the feature slider and (soap)boxes. Any suggestions to reanimate them?

Share this post


Link to post
Share on other sites
cmunns

The Read More Links for the features either 1) do not a have a link destination set, or 2) the text is extended too long pushing them out of view. For those features using posts, try manually creating a `` tag to cut the length of the excerpt on the post admin screen itself.

Share this post


Link to post
Share on other sites
aequator

Hi cmunns, 1) The Read More links are in the posts themselves, to which the feature slider redirects. 2) The text is not extended too long, I've checked. Furthermore, the tag is already in the text, and it worked perfectly before ... but I've done some research in the mean time. As I mentioned before, the only thing I've changed is to change the home page from a posts page template to a static page called 'Home'. It now appears that Wordpress only uses read more-tags on the blog posts page, and not on static pages. Sources: http://codex.wordpress.org/Customizing_the_Read_More http://wordpress.org/support/topic/more-tag-ignored-on-home-page From the first webpage:

How to use Read More in Pages Please remember that the "Read More" tag is used only on the Home page which shows the latest posts. It does not work in "Pages". If you want to turn it on in Pages too for showing a set of partial posts, use the following code inside the loop for the dynamic content:
	<?php
	global $more;
	$more = 0;
	?>
	//The code must be inserted ahead of the call to the content
	
	<?php the_content('Continue Reading'); ?>

It's not ringing a bell so far on where to put the code but I'll try some stuff and report back ;) I cannot just put this in the base.css can't I?

Added: Related forum posts: http://www.pagelines.com/forum/topic.php?id=1516 http://www.pagelines.com/forum/topic.php?id=3673 The problem is that I cannot change the main page to blog posts layout because I want a feature slider on the main page, but not on the category pages.

Share this post


Link to post
Share on other sites
aequator

Another update: I've put the code inside template.postloop.php of the Base theme on several places, but that didn't seem to work. It did say that I was in "the LOOP" right there. I've put it right before the_content.

<div class="entry_content">
									<?php [b]global $more;
	$more = 0;[/b]
										the_content(__('<p>Continue reading »</p>','pagelines'));?> 

Share this post


Link to post
Share on other sites
pcgs

This may sound silly but I'm using MAMP to develop my sites and then uploading ta remote server. I've found that my Read more links don't show up on my MAMP localhost version but they work fine when I upload to the server. Just thought I'd put that out there in case you are using a localhost setup.

Share this post


Link to post
Share on other sites
cmunns

Are we talking about these slides not having a link to the post? yil6k.jpg Because if that's the case you would not put the code in template.postloop.php it would have to be changed in section.features.php

Share this post


Link to post
Share on other sites
aequator

Hi Cmunns. In the old situation, when the home page was just a page with posts, all read more links worked properly. From the moment I redirected the home page to a static page with a feature slider, all read more links didn't show up anymore, so the text doesn't get truncated in the feature slider and the boxes. As I mentioned, the code should be put somewhere in the loop for the read more to work on a page. In the meantime - to make things worse ? - I've updated Platform Pro to 1.1.5. As I wanted to apply your suggestion, I cannot find section.features.php. There is, however, a file called Feature Page Page Template (page.alpha.php), an almost empty document. Hmm still stuck but I get the feeling we're getting there.. Any further ideas on where I can put it?

Share this post


Link to post
Share on other sites
aequator

Update: I've now reinstalled Platform Base because I had problems with showing categories and author pages. I saw that Platform Pro did handle them correctly. Still, in the fresh install, there is no section.features.php. I looked in the server file manager, and there is a section.features.php in a folder features or something like that (can't remember), both in the Pro and Base theme. @Cmunns: I've added this picture to show you what I want (again), for clarification. (and "lees meer.." is Dutch for "read more.." wrong.jpg

Share this post


Link to post
Share on other sites
bryan-hadaway

Not going to lie, this one is bizarre for sure, since the only thing you did that changed everything was to remove it from being a blog page; perhaps in Settings > Reading you would want to set it as the static front page AND blog page. Thanks, Bryan

Share this post


Link to post
Share on other sites
aequator

Hi Bryan, First of all, it's not possible to set one page as both static and blog page. Second, I don't want it to show up as a blog page because I want it as a home page with a feature slider and feature boxes. The thing is that I need the read more functionality (which is for WordPress only standard implemented in the blog posts layout) on the feature page layout. I know which code to use, I just need to know where to put it. But the file features.sections.php is not there. According to the documentation, it should be within the loop.

Share this post


Link to post
Share on other sites
Kate

@Lars It's contained inside of "platformpro->sections->features". Placing the modified file (within the same folder structure) in your child theme will overwrite this default file. Hope that helps.

Share this post


Link to post
Share on other sites
aequator

Hi all, Thanks for all your help. I've found the solution and will document it here for further reference. Okay, so the problem was where to put the code to get the read more tag to work on static pages. Look above for further info. There was no feature.section.php in the base or pro theme edit window. I tried copying the file structure of sectionsfeaturesection.feature.php from the Pro to the Base theme, and then edit the Base theme, but that didn't work. When I edited the original file (platformprosectionsfeaturesection.feature.php), it finally showed up! But only the feature, not the boxes (the whole static page is set as a feature page). The same was true for the boxes: I had to edit the original file (platformpro/sections/boxes/section.boxes.php), not the base file. When I say edit the file, I mean put this code before the_content:

<?php
	global $more;
	$more = 0;
	?>

I will keep this post 'unresolved' for some more time, not to bug you (you've been most kind), but to find an answer to a relating problem:

Why isn't it possible to edit the feature.php of the base theme? It should override the pro theme, right? I want to know why, because I don't want any problems when updating the pro theme.
Lars

Share this post


Link to post
Share on other sites
Kate

@Lars

There was no feature.section.php in the base or pro theme edit window
I should've been more clear... You would have to go into the folders directly, not via the WP dashboard. WP generally won't show files inside of directories inside of your theme. Sorry for the confusion. Also, the file is section.features.php. ;) Thank you for sharing your info as well. As for the feature.php question: Are you referring to section.features.php? If so, then yes, it should override the same file within platformpro (when placed in platform-base).

Share this post


Link to post
Share on other sites
aequator

To be more specific: editing the file platformbase/sections/boxes/section.boxes.php didn't override platformpro/sections/boxes/section.boxes.php similarly, editing the file platformbase/sections/features/section.features.php didn't override platformpro/sections/features/section.features.php Any idea why? I have the platform-base theme activated.

Share this post


Link to post
Share on other sites
cmunns

I just confirmed this is true, I'll check with Andrew if there needs to be special circumstances to override certain files.

Share this post


Link to post
Share on other sites
aequator

@cmunns: have you been able to check with Andrew yet?

Share this post


Link to post
Share on other sites
Andrew

Hey Lars, Give us til version 1.2.2 or 1.2.3 for better handling of templates and over-riding in the child theme. We'll create some better functions for you.

Share this post


Link to post
Share on other sites
aequator

Many thanks, Andrew and colleagues!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×