"The New Studiopress"

Community Forums Forums General Discussion "The New Studiopress"

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  joey 1 year, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29428

    joey
    Participant
    Post count: 10

    I am not so sure about the “new studiopress” The help is a lock down now you can not review or search all help topics like in the old form..so you might duplicate a issue? Worse its like studiopress is hiding something.. Than add to it Genesis is behind other major frameworks regarding HTML5  and some other major features are not included yet as well..Plus the framework locks out much of the WordPress basic codex for example you can not use the simple <?php if ( $user_ID ) : // if logged in ?> and its closing tag to create a simple member page this is code direct from the codex and its if you want to not use a plugin I mean this is simple stuff for a simple situation. More there are several examples of pure WP PHP code that will not function unless you know how to wrap it in Genesis.. its getting a bit weird.. Why? Because Revolution was just that a revolution way out front leading all theme shops if they even existed . No offense but I think its this copy blogger merge.. things have not been the same since then.. I dont know just feels off. Im sure to get flamed for this but I have to speak my mind..Im still pro plus all the way.. I just thought Studiopress would always lead the pack..Leave them in the dust so to speak..

    Joey

     

    #29443

    nickthegeek
    Keymaster
    Post count: 751

    First off, thanks for taking the time to address your concerns.

    The new portal os broken into a few of different sections. Support, documentation, and customization. This was done because a lot of legitimate support issues were being lost, especially for new customers. If you do a quick search you will see this is something we have written quite a bit on. We are working on improving documentation based on what is coming into support. The things we have coming in more often we are tracking and converting into documentation and working on putting that up front on the support request page so users with common issues can help themselves. The support system allows us to track this much more easily so we can better track this.

    The customization type questions are best placed here, and it is searchable, we are working on improving the search mechanism based on feedback from users.

    As to WordPress functionality not working in Genesis. We actually work very hard to use WordPress functionality. We do not replace it or lock it out. Most likely it comes down to correct usage. Using your example, you cannot use a global variable inside a function unless you declare it first. This is PHP 101 and is pretty easy to deal with.

    If $user_ID is global then you have to make it available like this
    [php]<?php
    global $user_ID;

    if( $user_ID ) {
    //do something

    }
    ?>[/php]

    #31810

    joey
    Participant
    Post count: 10
    This reply has been marked as private.
    #35676

    joey
    Participant
    Post count: 10

    Ok fine Nick  you  have answers, if you code it that way or the “genesis way”. I used that snippet correctly -exact from the WordPress codex.. look at your statement, you are basically saying because you use genesis you CAN use that php code from the WP codex but……you must wrap it like this or write it like this..(see your example) I tested the codex code in 2 other major frameworks and applied it at the top ( and closing snippet at bottom) of my template page I created and it worked fine..I would have had to come in here search, ask a dumb question waste your time..when what I know to do is go to the codex and get code and place it in my templates..now how am I wrong..Genesis is a lock out or at least a time wasting step to find out how to use codex snippets in a Genesis template.

    Further I do not want to ask customization questions in here..its not really appropriate IF a person customizes a template or framework it usually falls outside of support..Support is supposed to just cover the function of the framework..right?

    Look I am in the game here I am a pro plus member and have been. Im just feeling a bit compromised..Genesis is fine if all you do is go from PSD to Child theme..or add plugins (all plugins work well) its the little bits of code from the WordPress codex that do not work well..and that is a fact..I like the codex its what we are supposed to do and use..or so I thought..Im sorry…I do not post this without first working it thought and finally im not about to start coming in here with questions I know can be answered..Ill just do it different..You know you could try my example in other places before you tell me what is correct..you mean to say correct code for Genesis..or for a Genesis template. Do not forget this

    genesis(); This closing tag is what really is kicking out code form the wordpress codex.. That closing tag is usually something like this closing a template page <?php get_footer(); ?> Why run me around anyway? Quote “As to WordPress functionality not working in Genesis. We actually work very hard to use WordPress functionality. We do not replace it or lock it out. Most likely it comes down to correct usage. Using your example, you cannot use a global variable inside a function unless you declare it first. This is PHP 101 and is pretty easy to deal with.”

    Why not just do your own experiment? If I am wrong I would admit it..That statement is total B.S. I have got to call you on that.. No offense..

    But I did my homework..You must clear it say this is how to write it in Genesis to work in Genesis.. Not You are wrong this is php 101

    Thanks

    (Posting as public)

    #35683

    nickthegeek
    Keymaster
    Post count: 751

    This is the correct place to ask customization questions. It is a community forum where community members help each other.

    I’ve always said, there is no such thing as a dumb question, what may seem really basic to me because it is PHP 101 is confusing and difficult for someone who is not familiar with why certain things do not work the way they might expect. Which is why we have the forum. As you learn you will ask fewer basic questions and ask more advanced questions. In fact I would hope you would even start helping answer some of the basic questions, that is the whole community concept. If you continue to progress you may not need to ask questions and just show up every so often to help others out. That is a really cool place to be because you are in a place to watch others move from where you are now to a place where they have mastered the concepts.

    The global variables are basic PHP. It just doesn’t seem that way because when working in WordPress themes you often are not working within functions, but instead are in the global scope. Within Genesis things are compartmentalized so you will be working in functions or classes, you will not be in the global scope by default. This means every variable must be defined before you can use it. This is one of the first lessons in PHP. A variable does not have a value until it is given a value. Unless you have $foo=”bar”; then you have an undefined variable.

    So if there are global variables that you wish to use inside a function you must make it available by telling the function to use the global variable. This is done inside WordPress quite a bit. Go read the PHP inside WordPress and you will find “global” all over the place.

    This is how a variable can be defined inside one function, then used inside another function.

    If the variable is not global you must define it for use. This might look like
    [php]
    $user = wp_get_current_user();
    $user_ID = $user->ID;
    [/php]

    I pulled this from the codex

    http://codex.wordpress.org/Function_Reference/wp_get_current_user

    As for your original question, I got sidetracked by the secondary issues and did not do a great job answering that. You can use the code shown above or various other combinations of that, but there is a WordPress function to do just what you are describing.

    http://codex.wordpress.org/Function_Reference/is_user_logged_in

    Now it may be that in the codex they will abbreviate some of the code. It is written by volunteers and I have found that often things are not stated very clearly, it is assumed that users will have a good working knowledge of PHP, so they only give the minimum details on the function. Now I will say that they are much better than it once was. There was a time that there was no information and it was up to users to look at the original code.

    You may also wish to review my Genesis Explained series, it will help a good bit.

    http://designsbynickthegeek.com/genesis-explained

    There you will find that the “genesis();” function loads pretty much everything. It is more than just wp_footer(). It loads the header function, the core framework markup, all the hooks, and the footer function.

    You will also learn about how actions and filters work, which will help quite a bit.

    In closing, if there is some specific thing you are trying to do I would encourage you to start a thread in these forums. The folks here are really great and tend to do a great job at helping each other to learn how to do customizations.

    #38604

    joey
    Participant
    Post count: 10

    Ok I appreciate your trying to answer this but I think I was not clear in what I was saying is a lock out.

    That link you show to the user log in on the codex is correct..thats where I got that code..

    the real way to explain why Genesis is a basically a lockout is this. Let me clear this up once and for all.

    My example

    I want to set up a simple member page. I do not want to use a plugin. Why? Its a temporary thing..maybe say for a few weeks.

    So I use 3 basic things.. I create a template page and add my content. I than add the code from the codex to protect this page.

    <?php if ( $user_ID ) : // if logged in ?>     —See this sits at the top of the page

    This last part from the codex sits at the footer of my template page. Above the <?php tag..

    <?php else : // if not logged in go to login page

    $url = ‘/wp-login.php?action=register’;
    header(“Location:$url”);

    endif; // end if logged in
    ?>    <–this is usually placed below the <?php get_footer(); ?>

    I now have the page for *most WordPress themes protected (Try it youll like it)

    Next

    I than ask a user to register by setting up a custom registration form.. I use peters login redirect to finish it off.

    So user logs in is redirected to the content page..There are other simple ways to finish off a simple member page.

    Ok now for the Studiopress thing.. Genesis will not accept this code the theme kicks out a PHP error..

    Further I have tested this code snip (and many others) and done this very same thing in just about every theme out there including some large frameworks.

    You Nick are correct I *assume if I were to write that code as you sate above

    $user = wp_get_current_user();
    $user_ID = $user->ID;

    the “Genesis way” I say assume I have not tried this I am off on a new theme now. I under stand that genesis() loads genesis and is killer code for *Genesis..but just leave here go out get snips try them in a genesis template and tell me i am wrong..You have to re-write it and thats not possible..for many..for you and all the gurus sure..but the codex is there for a reason.So I can go in learn apply and fly..not go in fail go to the studiopress forums and ask,learn again,learn more lose time than finally get where I need to be.. Right? ( im sure to be flamed for this)

    So see what I am pointing out here? I can not go just get code from the WordPress codex and drop it in a Genesis template.

    Plus I really do not want to spend a inordinate amount of time in here asking questions about code snippets I know will work else where.

    If you doubt this try this simple member page experiment across some themes and than with A Genesis child theme..You will see exact what I say here.

    Im sorry I should have been more clear but I am right.. you are right as well..but noway do I have time to learn your way to write PHP just to use Genesis..That is not fair..

    This is my main point about Genesis and simple code form WP codex and I think you are right in asking a person to jump in learn but no..I would rather not at this point..

    There is no time for that. I have found a framework that works well and allows me to really use all the snippets I have.

    Im sorry for not being clear but I will not back down I am right..I saw how a lady was treated in the comments once for say Genesis was too hard..Flamed and blamed by the Genesis faithful but she was right..(i suspect she is no longer using Genesis)

    I have tested this and many snips of code from wordpress..many do not work well..

    Again sorry I lose not you I have many hundreds of dollars in Studiopress..but thats ok.. no time to whine..

    Thanks for your help and for being nice..you can close this thread..

    and if you want delete me.

    :)

     

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.