Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Just had some questions I hope someone can shed some light on. I am looking to restrict certain data on a WordPress page to certain users, there are lots of plugins that offer restricted content in some ways, but I am looking to only restrict very specific content on that page, not the whole page. Is there something I am missing or something I should look at?
Just to give some more information, we're working with custom post types and on one of the pages that show the custom pages, some of the data that is being pulled out (within appearance->editor, not actually the WordPress page) so I will need to be able to have some kind of access to if($userlevel == "something") {}.
Many thanks
Nevermind It is actually quite easy, check the userlevel and restrict content, perhaps add a new role:-)
Think you can write simple plugin for this task or modify current theme. May be section [a link] http://codex.wordpress.org/Function_Reference#User_and_Author_Functions help you. Wordpress Codex have a lot of information and you find what you need to solve your task. As i understand you need to use functions like user_can, current_user_can, current_user_can_for_blog or get_role and add_role inside wordpress loop.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
i'm new to php/html5 etc and i want to create a simple ecommerce site.
I want to put button that will show the more detailed information of the product. My question is, if the button redirects the user to product page does this means i have to make a page for each products?. So, if i have 100 products i have to rewrite 100 page?, Is there a better approach to solve this? Sorry if this is a silly question. thank you
i'll just put random code here because the damned restriction
<?php
session_start();
include_once("shop-config.php");
include("header.php");
?>
A better approach would be to store the products as well as their description in a database, then have one page where you can request that information. I recommend looking into MySQL because it works natively with PHP and it's very easy to use. Once you get the basic queries down and an understanding of SQL, it shouldn't be a problem. :)
(I know this isn't much of an answer, but I don't have my computer on me now and for some reason I can't leave a comment because of my reputation. I guess it's better for new users to spam pseudo-answers than comment xD)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
As mentioned in my previous question, I happened to see this site 22words.com and just can't figure out a few things:
1) in the source code, it seems the name of the WP theme is "twentytwo" but there's no such a theme in existence. How could this be possible? Maybe they used another theme and renamed it to "twentytwo"? Is that do-able? How to actually do it? Or maybe they just custom-made the theme and gave it a name called "twentytwo"?
2) Some posts have a big green "read more" button (e.g. twentytwowords.com/if-you-have-keys-and-a-purse-or-know-someone-who-does-youve-lived-some-version-of-this-story/) how does this work? If I want to mimic this approach for long posts, what's the best way of doing it?
3) The top navigation bar have drop-down menus such as "latest posts" and "popular posts" in the respective categories. Is all this a gimmick or not? I mean, what's being shown are actually "latest" and "popular" posts, or is it just BS and there's no stats to back up "popular"? If it's not gimmick, then how is it implemented? Which plug-ins are in place to calculate traffic and generate "popular" posts?
Any help would be much appreciated!
lets get this done quickly :)
1.) I guess they have made an own theme and named it that way.
2.) In the editor you have a "readmore" tag
if you click this you will insert a special line / markup.
Now your theme nees a call for this line
"Excerpts (teasers) can be shown on WordPress through two methods:
The first, keeping the the_content() template tag and inserting a quicktag called more at your desired "cut-off" point when editing the post.
The second, by replacing the the_content() template tag with the_excerpt()."
Here is all you need: Link to wordpress documentation the excerpt
3.) There are quite a lot of ways to do that. You could order posts by popularity by the number of comments or the number of views or the number of shares. There a loads of tutorials on the web to do so. It's so simple it would be sad to use a plugin AND: you could learn a lot from it...
tutorial by view is here: http://www.wpbeginner.com/wp-tutorials/how-to-track-popular-posts-by-views-in-wordpress-without-a-plugin/
tutorial by number of comments is here: http://www.jafaloo.com/how-to-display-popular-posts-in-wordpress/
all the best
fabian
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Hey stackoverflow users,
I'm curious about Wordpress, I'm new to the whole Wordpress theme creation so I've began by using the basics of HTML combined with looking through the Wordpress codex to build a theme.
However, I have one question: How could I make it so images could be changed through the admin panel?
Let's look at it like this, I could set out, say; a logo div and a banner div, is there a way I could be able to set them so their images could be modified through the panel?
What would be the easiest method to do this?
Thanks
You could use the following for the header image:
http://codex.wordpress.org/Function_Reference/add_theme_support#Custom_Header
You can also define custom text inputs via the Settings API:
http://codex.wordpress.org/Settings_API
I would say that the second link is not for beginners. To gain a little familiarity with theming I would try deconstructing Twenty Twelve or Twenty Thirteen. I would also examine the reason why you want to content manage these particular items. If you are looking to create a theme for distribution, there are many resources that can help you with this in the WordPress Codex.
there is no simple way to do that, you would first code or modify a theme to make it work like plugin, or what would i suggest is use theme editor in admin panel that is possible easiest way available.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I've noticed that when inserting links to other posts/pages using the visual/html editor, WordPress uses the url-structure chosen in the permalink settings.
Is it possible to use the standard permalink structure (yourdomain.com/?p=123) in the editor's link-dialog?
This way, I would be able to change the slug of the post or page I'm linking to, while still maintaining an active link.
It would make more sense to use a plugin like Redirection to automatically add htaccess redirects to redirect crawlers to the new address if you decide to change the permalink for a post down the line instead of exposing the ugly permalink to the public (and risk its being shared and indexed). Redirection has a setting that will add new redirects whenever you change a permalink automatically, so you don't have to do anything when you change links.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
The wordpress is such a great tool. I'm wondering if it will be a problem to start adding sections at some point, nothing to do with the blog, just sections for the site with different functionality ( say a database of searching stuff ) perhaps also incorporate and let user reistered through the word press database with the other featues in the site?
What should I need to know for this? will it be OK?
Some firm knowledge of PHP will allow you to write your own Wordpress plugins,
see this (Wordpress: Writing a plugin) page for more information.
There is also a 5 minute video tutorial about writing your first plugin which can be found here
You should try PodsCMS as a way of expanding on top of your vanilla Wordpress install. It's got a great interface, great tutorials, and the developers are always more than willing to help.
You can literally do just about anything with PodsCMS, especially with a good working knowledge of PHP and WordPress' workflow.
I've found the Wordpress plugin Magic Fields really useful for adding cms style features on Wordpress Pages. It may give what you want.
You can modify the wordpress pages if you want it integrated in the blog, or add new things on other pages.
Are you asking if you can use the wordpress login info for other sections of your site?