Community Forums › Forums › Archived Forums › Design Tips and Tricks › Using No Sidebar Pro Theme to Curate a Links Site
Tagged: curation, no sidebar pro
- This topic has 4 replies, 2 voices, and was last updated 8 years, 11 months ago by James.
-
AuthorPosts
-
January 2, 2016 at 3:32 pm #175405FrankJohnsonMember
Hi. I'd like to use the No Sidebar Pro theme's home page to display links to external pages. I'm using the PressForward plugin to curate external articles. And I want to use some of the custom fields created by PressForward to display the links on my site's home page.
I'm largely a WordPress novice. I'm also a PHP novice, although I can usually muddle through making changes to existing code.
In general, this is what I want to do in the entry-header portion of each article's section on the home page (with the custom field variables represented by the "{....}" portions of the code below):
<a href="{item_link}" rel="nofollow" target="_blank">{title}</a> by {item_author} at <a href="{pf_source_link}" rel="nofollow" target="_blank">{source_title}</a> * Curated on {date}
with:
item_link = link to external article
title = title of external article
item_author = author of external article on external site
pf_source_link = link to main website containing external article
source_title = name of main website containing external article
date = the date I publish the link (rather than the date the external article was originally written)In order to accomplish this, what files would I need to edit, where would I place the edits, and how would I revise the existing code?
Thanks in advance for any help anyone might be able to offer - I really appreciate it!
Frank
January 2, 2016 at 11:37 pm #175428JamesParticipantHi there
so basically what you could do is remove the post info, and then create a function to build a new post info with your shortcodes.
there is a filter as well for the post info, see below, but not sure if it will be compatible with your new shortcodes though.
January 3, 2016 at 12:02 pm #175468FrankJohnsonMemberThanks Jamie! I appreciate the help.
I looked at the snippets link and kind of understand what it's suggesting. I didn't follow it exactly. Here's what I did:
1. Tried the Simple Edits plugin to at least change the meta information under the post title (knowing that I would still have to deal with adding the link to the post title). What you suspected is true. The shortcodes just show up as text - they aren't populated with the post-specific information.
2. I figured that probably would hold true for using the snippets, but figured I'd try anyway. On the page you reference, it said that if your theme was HTML 5, to use the snippets on this page instead.
3. When I looked at the code on that page (to customize the post info), it looked a little bit different than what I already saw in the functions.php file (for example, the code on the snippets page references sp_post_info_filter but the similar code already in the functions.php file references ns_entry_meta_header).
4. As an experiment, I tried changing the already-existing code in the functions.php file to this:
//* Customize the entry meta in the entry header add_filter( 'genesis_post_info', 'ns_entry_meta_header' ); function ns_entry_meta_header($post_info) { $post_info = '<span class="by">by</span> [item_author] at <a href="[pf_source_link]" rel="nofollow" target="_blank">[source_title]</a> · Curated on [post_date format="M j, Y"] [post_edit]'; return $post_info; }
Unfortunately, that had the same results as the Simple Edits plugin - displaying the shortcodes themselves, not populated with the variables.
Does that mean what I want to do won't work because the functions.php file won't recognize the shortcodes that come from the PressForward plugin?
Thanks for your help - I really appreciate it.
Frank
January 3, 2016 at 1:47 pm #175479FrankJohnsonMemberActually, I'm going to dig into this template tags reference for the PressForward plugin to see if I can figure something out. Not sure how to use template tags, but ....
January 3, 2016 at 1:52 pm #175481JamesParticipantHi there
yeh that just means your shortcodes aren't being recognized...
there is another way of doing it, let me see if i can dig up the info, as i have done it for a few clients in the past...
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.