blzalewski 1 Report post Posted June 27, 2012 I'm trying to display two custom text fields (website_name and website_rating) in the Primary Sidebar and have failed to do so. If the post is in the Websites category, I want the widget displaying the data to be activated. What is the most direct way of accomplishing this? I have tried searching in the forum/all of over the internet and have failed to come up with a working solution. Share this post Link to post Share on other sites
catrina 103 Report post Posted June 27, 2012 The only way would be to make changes in the code, which requires that you use the Base theme in PageLines Framework. I've been searching around, as well, but couldn't find a solution. Have you tried searching for a plugin that would allow you to do this?: http://wordpress.org/extend/plugins/ Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
blzalewski 1 Report post Posted June 27, 2012 Thank you so much for the prompt response Catrina. Any idea on how I could modify the Base theme to do this? I have looked up how to do this but all the possible solutions I have found conflict with the Pagelines Framework. Share this post Link to post Share on other sites
Rob 547 Report post Posted June 27, 2012 Hi, The issue you're facing is really not theme related in any way, but WordPress. We don't create the widgets. But, that said, you can. You may also use something like Shortcode Exec PHP to create a shortcode and use a standard text widget to apply it. Creating a custom widget is something you'd learn about at www.wordpress.org. Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites
blzalewski 1 Report post Posted June 28, 2012 all of the solutions I have come across ask me to add code to functions.php and the last time I did this my website crashed Share this post Link to post Share on other sites
catrina 103 Report post Posted June 28, 2012 Depending on where the code is placed in functions.php, the site may crash. Also, there may be something wrong with the code itself. Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
blzalewski 1 Report post Posted June 29, 2012 Thanks again for the prompt response Catrina. Rangelone.. this has something to do with pagelines because if I weren't using pagelines this would be a very simple addition. Replace: With: ID, "sidebar", true); get_sidebar($sidebar); ?> Pagelines builds the sidebar differently than a normal Wordpress set up and I can't figure out how to do it or find any documentation relating to it. I should be able to add that one line of code in somewhere I just can't figure out where. Also, if I can't figure out how to do this through Pagelines then I would like to figure out how to disable Pagelines' control of sidebars. Any ideas? Share this post Link to post Share on other sites
blzalewski 1 Report post Posted June 29, 2012 Maybe I could create a second sidebar.php file called sidebar2.php and somehow have that sidebar2.php called on the pages I need it to be called on? Share this post Link to post Share on other sites
Danny+ 1,327 Report post Posted June 29, 2012 Hi, Have you tried this plug-in ? http://wordpress.org/extend/plugins/custom-field-widget/ I have no experience with the plug-in itself but from the description, it may be what you're looking for. Please search our forums, before posting! Share this post Link to post Share on other sites
jbrouwer 5 Report post Posted June 29, 2012 This code in functions.php works for me: [code]add_action('pagelines_inside_top_sb_primary', 'my_custom_sidebar'); function my_custom_sidebar(){ ?> My custom widget: Some text to display. queried_object) && $wp_query->queried_object->ID){ $field = get_post_meta($wp_query->queried_object->ID, 'key-of-custom-field', true); echo $field; } ?> 1 Share this post Link to post Share on other sites catrina 103 Report post Posted June 29, 2012 Thanks for posting your solution, @jbrouwer Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse 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 Login via PageLines Signup To PageLines Sign in to follow this Followers 0
catrina 103 Report post Posted June 29, 2012 Thanks for posting your solution, @jbrouwer Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites