Forum Replies Created
-
AuthorPosts
-
July 27, 2014 at 12:29 pm in reply to: Adding a widget above the page title on certain pages #115384
McGuive7
MemberHi Suzy,
I think you're on the right track with widget areas. If you needed different output on a per-page basis, then I would recommend implementing custom fields, however widget areas will work better for content that's shared across pages in specific sections. Anyhow, here's the solution I've implemented for this type of functionality on previous projects:
- Create your widget area. Sounds like you've done this already.
- It looks like the content is essentially mimicking the menu structure, so you could use a plugin like Simple Section Navigation. Not sure if that's what you're going for. Either way, add you content-specific widgets to the new widget area.
- Use a plugin like Widget Context or Widget Logic to control where the widgets display. This will allow you to output specific content on specific sections of your site, either via url pattern matching, or custom PHP logic. This will be dictated by how your different sections are defined. If they are just based on your page structure, then Widget Context and URL matching should work well.
- Output the widget area on whichever action hook works best for the location you want. Based on what you've described and the current layout of the site, it looks like
genesis_entry_header
should work well (the Genesis Visual Hook Guide is a great resource to figure this out). One thing to mention is that you'll likely want to add anif ( is_singular() )
conditional to make sure the widget isn't output on posts on archive/search/etc pages.
So that's the top-level view of what I've done. Let me know if you need more specifics or have any questions. Best of luck!
McGuive7
MemberI second Kellylise's message. Definitely switch over to a local code editor (I recommend Sublime Text 2) and use FTP. Making edits from the admin is a surefire way to end up in the situation you found yourself in.
Once you make the switch over to FTP, I recommend changing the WP_DEBUG definition in wp-config.php from FALSE to TRUE. More instructions/info here: http://codex.wordpress.org/WP_DEBUG
Once you do this, it ensure that (for the most part) if you ever do get the WSOD you'll also see the PHP errors that are causing it, which is pretty indispensable when debugging.
So to answer your final question, if you do take these two steps, you can still use your final code that was generating the erros/WSOD. With WP_DEBUG set to TRUE, you'll be able to see exactly what part of your code is causing the issue, and fix things accordingly.
McGuive7
MemberHi Suzy,
I think you're on the right track with widget areas. If you needed different output on a per-page basis, then I would recommend implementing custom fields, however widget areas will work better for content that's shared across pages in specific sections. Anyhow, here's the solution I've implemented for this type of functionality on previous projects:
- Create your widget area. Sounds like you've done this already.
- It looks like the content is essentially mimicking the menu structure, so you could use a plugin like Simple Section Navigation. Not sure if that's what you're going for. Either way, add you content-specific widgets to the new widget area.
- Use a plugin like Widget Context or Widget Logic to control where the widgets display. This will allow you to output specific content on specific sections of your site, either via url pattern matching, or custom PHP logic. This will be dictated by how your different sections are defined. If they are just based on your page structure, then Widget Context and URL matching should work well.
- Output the widget area on whichever action hook works best for the location you want. Based on what you've described and the current layout of the site, it looks like
genesis_entry_header
should work well (the Genesis Visual Hook Guide is a great resource to figure this out). One thing to mention is that you'll likely want to add anif ( is_singular() )
conditional to make sure the widget isn't output on posts on archive/search/etc pages.
So that's the top-level view of what I've done. Let me know if you need more specifics or have any questions. Best of luck!
McGuive7
MemberExperiencing a weird issue. I just tried posting a response on the following thread: http://www.studiopress.community/topic/adding-a-widget-above-the-page-title-on-certain-pages/
The message contained numerous links and
<ol>
list items. After hitting submit, my response didn't appear on the thread. I tried resubmitting and I got the following warning:
ERROR: Duplicate reply detected; it looks as though you’ve already said that!I just tried to submit a thread of my own to document this issue, and when I pasted my message in here and it also failed to appear (which was the issue I was trying to document). I just tested this and my message worked fine until I tried adding two links using the editor's native "link" button. The links were for https://wordpress.org/plugins/widget-context/ and https://wordpress.org/plugins/widget-logic/. Any ideas why embedding these two links would cause my message to totally disappear? Is there a limit on the number of links in a response?
McGuive7
MemberYou're right, the code you're using is a way to FORCE a layout, often used for a specific page template or post type, etc.
If you want to just modify the default layout, or any Genesis default for that matter, you'll probably want to use the
genesis_theme_settings_defaults
filter. You can check out a good example from Bill Erickson here: http://www.billerickson.net/code/genesis-theme-settings/May 2, 2014 at 10:18 am in reply to: Re-position Post Meta & Info in Featured Amplified plugin #103335McGuive7
MemberHi Davinder,
If you dig into widget.php within the plugin, you'll see that all output within the widget is tied to various hooks - so the good news is you can move pretty much anything around in any order you desire.
For example, right now the following hooks are used to add post info and meta:
add_action( 'gfwa_before_post_content', 'gfwa_do_byline', 10, 1 ); add_action( 'gfwa_after_post_content', 'gfwa_do_post_meta', 10, 1 );
If you want to switch the two, you can just include a variation of the following code in your functions.php or a custom plugin file:
// Remove the original action hooks remove_action( 'gfwa_before_post_content', 'gfwa_do_byline' ); remove_action( 'gfwa_after_post_content', 'gfwa_do_post_meta' ); // Add your new hooks add_action( 'gfwa_before_post_content', 'gfwa_do_post_meta', 10, 1 ); add_action( 'gfwa_after_post_content', 'gfwa_do_byline', 10, 1 );
You may need to tweak things depending on exactly where your code lives, but that's the gist. Let me know if you have any other questions, or if this isn't working for you.
McGuive7
MemberWe did get this resolved, although I never heard back from ya'll on the answer.
We found it thanks to the incredible Mr. Gary Jones:
McGuive7
MemberHi Anitac,
To answer your question, our child theme is just a "mobile first" version of the default Genesis 2.0 sample theme, so it doesn't add any functionality or new layouts. What it primarily does is provide a modified style sheet that serves up mobile styles first, which means faster mobile loading times, no flashes of oddly styled content at mobile sizes, and an overall better experience for users on their phones or tablets. Does that answer your question? Definitely let us know if you have anything else we can help address.
Thanks!
- MickeyMcGuive7
MemberRight, that seems to be the problem. Turns out there's an add-on for FeedWordPress that can do this, but it seems silly to combine two plugins to do the job of one. Any good experiences with other feed plugins that DO import media content into the library?
Thanks!
-
AuthorPosts