Forum Replies Created
-
AuthorPosts
-
HawkeyeParticipant
An overdue postscript to all of the above....
I tried every possible permutation of Genesis hooks and none of them produced the specific results I was looking for. Either the share buttons displayed on pages I didn't want them to display on or they displayed in locations I didn't want or both.
In the end, it turns out that Amanda's code above was the correct implementation, with one small modification. In addition to specifying that the buttons should appear after single posts, I also needed to include a few other locations where I wanted the buttons to show.
Here is the code that I'm now using to accomplish that goal:
function social_after_posts() { if ( is_home() || is_single() || is_archive() || is_search() ) { ?> INSERT JAVASCRIPT HERE <?php } }
The key line is the 'if' statement, which now includes three additional locations where the social buttons should appear. If you want to add more or delete some of those, there's where you'd do it. (For more on CONDITIONAL TAGS that you can use to tell WordPress what to do, go here.)
In addition, because of the way the Wintersong theme functions, I changed this --
add_action('genesis_after_entry', 'social_after_posts');
-- to this --
add_action('genesis_entry_footer', 'social_after_posts');
-- so the buttons would display in the proper spot.
Mark
HawkeyeParticipantOkay, got it -- and as often happens I did so simply copying something else on the site that was already working. In this case the AddThis menu code, which showed me how to add a "div" to the code I originally pasted in above.
Here's what worked for me:
add_action('genesis_after_entry', 'next_previous_after_posts', 5); function next_previous_after_posts() { if ( is_single() ) { ?> <div class="testclass"> <?php previous_post('« « %', '', 'yes'); ?> | <?php next_post('% » » ', '', 'yes'); ?> </div> <?php } }
This now adds links for the next and previous posts just after the meta information at the bottom of single-page entries. You can change the class name to anything you want, create a CSS element with that same name and control how the links display on the page. (Also added a '5' to the original code for timing: not sure what that does, but it was important in terms of specifically where the links appeared in the document page.)
HawkeyeParticipantAfter poking around the web a little more I think the code I pasted in above is actually javascript with some PHP added, so maybe what I'm looking to do is add a css class to the javascript part. Or not.
As you can see, I'm a bit out of my element here. (Pun intended.) 🙂
HawkeyeParticipantHi Davinder,
Thanks for replying. I added this to functions.php but I was still unable to style the displayed text with CSS.
(I usually test that just by trying to draw a border/box around the text to make sure I've got control over it.)
Can you (or anyone else) point me to reference materials that cover that subject? I've looked it up every way I can on the web but I'm clearly unfamiliar with the appropriate terminology. In looking at other lines of code in my functions.php file I can see several different ways that classes are declared, but I still haven't found a simple way to add such a declaration to the code I pasted in above.
Thanks,
Mark
HawkeyeParticipantAwesome explanation Tony, and 100% spot-on. Here's the actual line from functions.php in Wintersong:
'//fonts.googleapis.com/css?family=Roboto+Condensed:300|Roboto+Slab:300,400'
As you can see, the theme uses an even more minimalist approach than you hypothesized, but it's perfectly in keeping with what I saw when I tried to use values that aren't represented. From what I can tell almost all changes to font styling are handled in other ways, limiting the load of the font itself to those two sizes.
I'm also really glad I asked this question before I started fiddling around with changing the default font and completely confused myself.
Thanks again,
Mark
HawkeyeParticipantJust a follow-up here. In the Wintersong settings there is only one option for displaying the page under Genesis > Theme Settings > Layout, and that's with the content on the right side of the page and the header/widgets on the left.
I don't know enough about CSS to say that you couldn't swap the two, but from monkeying with the theme for a while I think it might be a real bear to pull off.
One additional point of possible confusion is that in the documentation for the theme on the setup page there are several references made to features occurring on the left or right which are in fact the opposite of what you see in the demo. For example:
In the Wintersong Pro theme, the Header Right Widget area is displayed in a fixed location to the right of the screen and below the Header Image and Site TItle.
This widgeted area actually displays on the left side of the screen, as shown in the demo.
Mark
HawkeyeParticipantNever would have thought of this in a million years, but it turns out the answer is a CSS tweak.
To turn off the text and any formatting (dividers) that appear after you run a search, replace whatever you have in your style.css for the .archive-description with this:
.archive-description {
display: none;Worked perfectly in Wintersong, and because I have breadcrumbs on for Archive pages there's still a note at the top of the search results page that lets users know where they landed.
Mark
HawkeyeParticipantThe next/previous feature at the end of each blog page is apparently called "post navigation".
In Genesis themes you can change post navigation from the default next/previous to whatever styling is used by going to Theme Settings > Content Archives (scroll down) and changing the "Select Post Navigation" setting from Previous/Next to Numeric.
HawkeyeParticipantJust a follow-up here to make things clear for anyone else who has a similar issue....
My initial description of the problem was faulty because the implementation I attempted was shifted on the page by the category and tag information displayed in the theme. I had the code in the right place, but because of a 'float' it displayed somewhere else, confusing me about what was happening. (A common occurrence with CSS.)
What's working now is putting the AddThis javascript code directly into the genesis_entry_footer hook using the Genesis Simple Hooks plugin. Doing so displays the share buttons where I want them on both individual post pages and the home/blog page, although I have to use CSS to get them to appear exactly as desired. (Another common occurrence with CSS -- but thankfully one it was designed for.)
Mark
HawkeyeParticipantBecause I added two updates it may seem as if someone from SP responded, but as you can see that's not the case. I'm still trying to get the next/previous buttons to display and having no luck. Please read the previous posts to see if this is a problem with the default theme as it is currently configured.
Thanks,
Mark
HawkeyeParticipantQuick update number two....
There's only one site in the showcase using the Wintersong theme:
http://just-thauna.com/page/2/
If you scroll down you'll see that the buttons are missing on that site as well, which displays the default text links.
On the comment page for that site, however, the "comment" button appears as it should for the theme (scroll down):
http://just-thauna.com/2013/08/the-day-we-went-to-spoleto/
Could there be something missing in the downloaded theme file that is not displaying the buttons as they appear in the demo?
Mark
HawkeyeParticipantQuick update:
After poking around more with the theme I can confirm that I'm seeing the square theme button for the "post comment" link, but the theme buttons for next/previous are not showing.
HawkeyeParticipantI tried it out and it works perfectly, which makes you my favorite person in the whole world. 🙂
Thank you.
Mark
HawkeyeParticipantAndrea,
I'm using Addthis code (javascript), which I've used before on several sites. (Wintersong doesn't really have the space for widgets.)
In previous incarnations of StudioPress themes I simply deposited the code where I wanted it (archive.php, page_blog.php, etc.), but I know that's not how Genesis and the child themes work.
Thanks,
Mark
HawkeyeParticipantResolved my specific problem by changing the "Upload Path" in the settings for my site to match the upload folder I created locally. (I am tinkering with WP MU so I found this setting under the network settings for the specific site I'm working on.)
HawkeyeParticipantI'm using a different theme on localhost and having the same problem. I do not see uploaded images in the media library and when I tell the theme to display the image in the header it shows as pure white and obscures the header text if it's on.
What I have noticed in the media library is that the image files are being referenced in a location that does not actually exist on my computer: http://localhost/sitename/wp-content/uploads/2014/01/image.jpeg
There is no 'uploads' folder in any install of WP or any theme on my computer, but WP's media library says it's there.
If I search for that specific image it shows up in a completely different folder:
C:\data\19\1\67\149\1882638\user\2046592\htdocs\wordpress\wp-content\uploads\20141
I don't know how to resolve this because I can't figure out how to point WP to the right folder or where to create the folder it wants, but this does seem to be a disconnect. Does this help? Any advice?
HawkeyeParticipantThanks for the quick reply. I think I can handle the CSS changes that would be necessary, and if not I can always come back here and beg for help! 🙂
If anyone using the theme has done this or has a site up that demonstrates the change I'd love to see it.
Thanks,
Mark
HawkeyeParticipantThanks, Tim, that's exactly what I was looking for. I already have the site running locally and I've been fiddling with settings, but I didn't want to break something out of brute negligence.
I really think the idea of a mobile response site is important today, given how many people have abandoned the desktop for handhelds. The simplest way I've found to demonstrate the utility to myself and others is to open a desktop browser with two tabs showing a m/r and non-m/r site, then resize the width of the entire browser. The non-m/r site gets truncated, while the m/r site adjusts to the changes by going vertically. Very cool.
Thanks,
Mark
-
AuthorPosts