Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: homepage, permalinks, shortcode, subpages
- This topic has 11 replies, 3 voices, and was last updated 10 years, 2 months ago by
Mitch.
-
AuthorPosts
-
02/20/2013 at 2:36 am #251879
Mitch
GuestHey Steven,
Hope all is well. I wanted to circle back around on a feature request that we discussed a few months back when you first implemented permalinks.
It would be very beneficial if we had the ability to have certain connections results ‘land’ on a different ‘home’ page. (Home being used as the name of the page in which the shortcode is placed).
By way of example, I would like to see homepage2/company/abcco/ land on a page that has a different layout (via my creation in wordpress) than the default connections ‘homepage’ (since on the default ‘homepage’ I have multiple instances of c0nnections shortcodes on the page and some ‘intro’ and ‘closing’ text wrapping the shortcode results). On the new homepage2, I would simply have one instance of some basic connections shortcode.
I’m likely doing a poor job of explaining this. :) Does this make sense. If not, it might be easier with some screenshots to explain what I do now vs. what a preferred implementation of this would look like.
I welcome your comments on this or how I might otherwise implement the concept.
As always, thank you for your continued efforts here.
Mitch
02/21/2013 at 8:31 pm #251977Steven Zahm
Keymaster@ Mitch
Hey, how’s it been going?
I get what you’re asking and why … but honestly, I don’t think I’ll ever be adding an option to set a “secondary” home page. However, with that said…
If things go even half according to plan during the course of the next few months I may have more free time to devote entirely to Connections and if that comes to fruition as I hope it does. And if I get that free time, I have something in the planning stages that will not only do what you want, in concept, but be far, far, more flexible.
Sorry, for the cryptic reply. I just don’t want to make any promises I may not be able to keep.
02/24/2013 at 6:23 pm #252209Mitch
ParticipantGoing good, busy times. I see we just passed over 90K in the repository. Nice. Hope the add-ons are working out well for you. I’m still waiting patiently to buy ‘Locate’ :)
So I get the cryptic reply… if you wanted to make promises you couldn’t keep, you be in politics. :)
I just still haven’t figured a good (functional and aesthetically pleasing) workaround for this need. I just don’t know what to do. I need the ability to have the multiple connections code with a Featured vs. Rest on the same (home) page more than the ability to properly implement permalinks. Having my cake and eating it too would obviously be the preferred alternative. :)
If you get any brainstorms that might provide a short term option prior to you (possibly) releasing the mother of all versions, please LMK.
Have a great day!
02/25/2013 at 2:16 pm #252273Steven Zahm
Keymaster@ Mitch
Two thoughts, maybe you could use the Redirection plugin to redirect the specific links you want on a second home page.
But…
Is a second home page necessary? Your main listings page doesn’t necessarily need to be the directory home page. The page that you have the before and after content with multiple Connections shortcodes is the main page that you link to in you menu but the Connections home page could be another, maybe a sub-page, where all the links resolve to and only have the Connections shortcode. The net effect would be two “home pages”. Would that work?
02/26/2013 at 7:08 pm #252431Mitch
ParticipantI thought about Redirection, since I do use that plugin on the sites, but I just didn’t want to set up 60 redirects on each site (maybe I’m lazy) :)
However, I never thought of the idea in your other comment. I am going to test that theory in the sandbox and see if I can get it to do as I’d like. Thanks for the idea.
As always, looking forward to what new features you roll out next.
Take care…
03/13/2013 at 2:01 pm #253973Mitch
ParticipantHey Steven,
I’ve got to be doing something wrong here. In theory, your idea (above) makes sense. Here’s what I have done:
I create a ‘new’ page that I place connections shortcode (only) on, and make THAT the ‘home’ page for connections;
I have the ‘other’ page which has multiple connections shortcodes and intro/exit text and images above and below the connections shortcode. THAT page is NOT the connections ‘home’ page, but I link to it in the menu;
When I am open the ‘other’ page (e.g. via menu link/where I have people ‘land’ when linked to the database), and click the title (permalink) of the connections entry, it loads the ‘other’ page layout not the ‘home’ page. Therefore, all of the multiple shortcodes and intro/exit text is there, when I didn’t think it should be.
so when clicking the company name in the record, instead of ‘URL/homepagename/name/yourcomnpanyname’
it launches ‘URL/otherpagename/name/yourcomnpanyname’
I thought the ‘home’ page would be where the permalinks landed?
Does my explanation make sense? Any guidance?
Thanks!
03/15/2013 at 11:02 am #254200Steven Zahm
Keymaster@ Mitch
Ugh. What you’re seeing is right … the logic for the links when the shortcode is used on a page will direct to the page it was used on. This complex logic was put in place to support all those using Connections to run multiple directories on multiple pages … it’s the widgets that will always direct to the home page.
The only thing I can think of to make this work for you in this way letting you know the small edit you need to make to force the home linking … another option might be to add an option to the “Advanced” tab to force home page linking….
Thoughts?
03/15/2013 at 11:24 am #254205Mitch
ParticipantI think a tick box option in the advanced settings would be great, but until you can get to it, I’d be happy to manually edit something to achieve this. I already do a couple of tweaks, some I know enough to be dangerous. :) Please point me in the right direction and I’ll give it a shot.
Thanks.
03/15/2013 at 11:35 am #254208Steven Zahm
Keymaster@ Mitch
Ok, first, I have not tested this at all, but it should work…
Open the class.utility.php file.
On line 426, you’ll find a variable named: $homeID
Copy this variable.
Now, go to line 434 which should be this:$permalink = $wp_rewrite->using_permalinks() ? trailingslashit( get_permalink() ) : get_permalink();
Now using the $homeID variable make the changes so line 434 because this:
$permalink = $wp_rewrite->using_permalinks() ? trailingslashit( $homeID ) : get_permalink( $homeID );
Now, no matter what, the link should always point to the directory home page.
Let me know how you make out.
03/15/2013 at 12:29 pm #254211Mitch
ParticipantHmm. No bueno.
For confirmation, after changes, Line 434 now equals
<code>$permalink = $wp_rewrite->using_permalinks() ? trailingslashit( $homeID ) : get_permalink( $homeID ); </code>
yet, when I click on a record title (permalink) displayed on the “otherpagename” it generates a URL as such:
‘URL/otherpagename/12710/name/yourcompanyname’
where ‘12710’ equals the wordpress pageID of the homepage as set in the Connections settings.
could it be related to the structure of Line 440?
Thanks for working through this with me.
-
AuthorPosts
You must be logged in to reply to this topic.