I'm in the process of trying to create a custom theme for Wordpress and managed to create a working widget area. But for the purpose of this theme, I would like to allow only one "Text-Widget" to be used. How would I go about limiting this?
Be specific about what you want to ask. Wordpress don't limit widgets you can use as much text widget.
Can you provide urls so we could advice a solution to you?
I'll update the code below to be compatible with your theme if you can give a url to your blog.
WordPress don't allow you to limit the number of widgets but you can use javascript to hide the next sidebar items.
$('.sidebar li:gt(0)').hide();
the 2nd list item onwards will be hidden.
and yeah, this is a bit of cheating though.
SEO wise the next widgets are still visible.
Related
I need a WordPress plugin that will let me hide a bunch of content until a user clicks on a Read More link.
Sounds easy, but here's the twist:
I need to hide both text and images
The content is set up in separate WP Bakery blocks
All the plugins I found so far only work within a single block, they can't hide multiple blocks.
I'm a designer, not a developer, so I'm sure I'm missing something. Is there a reason this can't exist?
Please halp! I really don't want to redo the content.
I talk in pictures better than in words, so here's an illustration of what I mean
I am a newbie in wordpress and I was given the opportunity to edit a certain plugin which is MarketPress, but then I had hard times dealing with it since I'm new to this thing and I don't know where exactly to go, I would want to edit an included dynamic_sidebar but I can't the file on where to edit this. Please help me. :(
Thanks.
Not sure of your level of understanding so forgive me if this is over-simplistic.
The sidebar content is driven by widgets, which is controlled from the Widgets admin panel. The only thing about a sidebar that you should be able to edit by messing with its definition are the wrapping markup for the whole widget and for the title, along with the sidebars name and description. The last two only effect text that shows up in the admin Widgets panel.
However what I describe above is not found with the dynamic_sidebar() method, rather with the register_sidebar() or register_sidebars() methods. These 'define' the name and settings for a sidebar. The dynamic_sidebar() method is the used to implement the sidebar by passing it that sidebars name.
The sidebar is then populated with widgets via the admin Widgets panel.
Typically sidebars are registered from within the functions.php file of a theme, but if a plugin contains templates there no reason why it couldn't also have its own sidebars. As for where the register_sidebar() function is being used in your plugin specifically, I couldn't say. Just search through it using whatever IDE you like, or grep if your comfortable with it.
Hope this helps.
I want to add a google maps widget to Pages on a Wordpress site. They all have the same Template with a Sidebar but the map will be unique for each. I feel like there should be a way to populate the widget from the edit page screen for that Page. Does each Page actually need it's own Template?
This seems limiting maybe I'm missing something. If the question is unclear I let me know but I think this should be something ppl have run up against before.
I would suggest the integration of a wordpress plugin to accomplish this. It will be fairly easy to do.
If you want to do this without purchasing any 'pro' versions of a plugin and don't mind writing some simple code, then I would suggest Simple Google Map. You will have to insert a shortcode into the widgetized sidebar area. Here is the plugin link - http://wordpress.org/extend/plugins/simple-google-map/
In order to customize each page's sidebar area, You need to write some code. Please refer to this article which will explain how http://www.wpbeginner.com/wp-themes/display-different-sidebar-for-each-post-and-page-for-wordpress/
It involves a simple alteration of your 'single.php' file and the usage of 'custom fields' so that you will be able to do this from the edit screen of the page, just like you wanted to do!
Use a plain text widget for each map and Widget Logic to select the page it appears on: WordPress › Widget Logic « WordPress Plugins
I wanted to create a horizontal based wp theme.
Something like this one (http://www.lena-meyer-landrut.de)
What would be the best starting point to do that?
Every menuitem(category) is a single post? A custom field? a page? Something else?
Thanks for your help.
If the content doesn't change too often, you can use pages.
But with that theme you would have to write multiple wordpress loops, this code can get quite messy.
Create a loop for each "page" that shows up on the page.
Another way...you could hard-code the design + jQuery sliding.
Then for the plain content sections you could create multiple "sidebars" and put a sidebar where each content part is...the user could then edit their own content with a text widget.
http://www.quickonlinetips.com/archives/2007/11/how-to-create-multiple-dynamic-sidebars-for-wordpress-widgets/
Custom posts are okay, but if you are writing more than 1 custom post per page/post, then it can get quite cluttered...
I think the best option for you would be to build your site based off one of the frameworks of an existing horizontal theme...
Here is the best information I found:
http://wordpress.org/support/topic/horizontal-way-for-wordpress?replies=13
Direct link to the old "horizontal way" theme for wordpress:
http://www.thehorizontalway.com/download/THW_template_0.6.zip
Here is another base theme to base your site off of:
http://wordpress.org/extend/themes/wplatformer
I have a project that i would like to complete in Wordpress.
Basically, the story is that I have 8 boxes on my page that would each be enclosed in their own div.
I want to have a form on another page that a user can fill out and they would get to choose a box in which to put images or text into. If a box is taken, they can’t choose that one and must choose another.
What would be the best approach for this? I was thinking something like a CSS gallery type theme but how would I go about letting the user choose which box?
Any ideas and nudges in the right direction is appreciated.
I would do this in Drupal, or straight php. I think wordpress is going to be an impediment here rather than a boon. I would make each box a drupal block or node and use the standard form, to allow users to trigger editing that box. Then use CCK in control content like pictures and text and the way they display. Hope this helps.
The only way I can see this going anywhere is more or less completely bypassing Wordpress. So you use Wordpress only to render the theme, but the form action goes straight to PHP.
This way you're free to parse the form posts and store the uploaded images somewhere.
You could try to shoehorn everything into a Wordpress comment, but I don't think attaching files would work. So your best bet is to just have the form action point to a PHP file and handle everything manually.
It should be easy enough to query a custom table in the database using your theme's functions.php and $wpdb.