Title: Adam's Replies - page 3 | WordPress.org

---

# Adam

  [  ](https://wordpress.org/support/users/umbercode/)

 *   [Profile](https://wordpress.org/support/users/umbercode/)
 *   [Topics Started](https://wordpress.org/support/users/umbercode/topics/)
 *   [Replies Created](https://wordpress.org/support/users/umbercode/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/umbercode/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/umbercode/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/umbercode/engagements/)
 *   [Favorites](https://wordpress.org/support/users/umbercode/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 31 through 45 (of 63 total)

[←](https://wordpress.org/support/users/umbercode/replies/page/2/?output_format=md)
[1](https://wordpress.org/support/users/umbercode/replies/?output_format=md) [2](https://wordpress.org/support/users/umbercode/replies/page/2/?output_format=md)
3 [4](https://wordpress.org/support/users/umbercode/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/umbercode/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/umbercode/replies/page/4/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adding HTML and Javascript into PHP for Menu items](https://wordpress.org/support/topic/adding-html-and-javascript-into-php-for-menu-items/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/adding-html-and-javascript-into-php-for-menu-items/#post-3164865)
 * Never go change things inside the wp-includes or wp-admin folders! Keep your 
   own code isolated to your own theme folder and/or plugin folder. Never change
   files outside those. The reason is that when you update WordPress those files
   will get overwritten by newer version and thus delete your changes.
    Second, 
   using the event-attributes (onmouseover, onmouseout) on HTML elements is not 
   recommended in general. You better create a hook from inside your external script
   itself. Easiest way to do this is using jQuery with something like: $(“a.myelement”).
   mouseover(function() { MM_swapImage(etc.); }); HOWEVER, if I guess correctly 
   those MM_functions are from MacroMedia (from the older Dreamweaver of Flash products?)
   and their function is simply to change the background of the link that you hover
   over, right? Which is far better done using CSS: a:hover { image: url(contact.
   gif); }
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Custom infinite scroll and archives/search](https://wordpress.org/support/topic/custom-infinite-scroll-and-archivessearch/)
 *  Thread Starter [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/custom-infinite-scroll-and-archivessearch/#post-3164334)
 * I came to the conclusion I oversimplified my idea so I am completely rewriting
   this code from a different angle. Sorry for the void question, please ignore 
   this thread.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [creating two versions of the same site, only one live at a time](https://wordpress.org/support/topic/creating-two-versions-of-the-same-site-only-one-live-at-a-time/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/creating-two-versions-of-the-same-site-only-one-live-at-a-time/#post-3164553)
 * Everything in a theme is self-contained. So if you use a local install of wordpress
   you can mess about as much you want without having to fear of messing up anything.
   then when you are done, just install that theme on your existing site and activate
   it. if something is wrong at that point, you can always safely revert back to
   the old theme without any problems. Provided ofcourse you keep all your coding
   within the theme directory.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [404 error when trying to login](https://wordpress.org/support/topic/404-error-when-trying-to-login/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/404-error-when-trying-to-login/#post-3164449)
 * In the admin area go to settings and then permalinks. You may need to set the
   desired option and then save.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [I have a doozy…..](https://wordpress.org/support/topic/i-have-a-doozy/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/i-have-a-doozy/#post-3148151)
 * Can you email me, perhaps we can get more “productive” that way. As long as you
   post the solution here later when we find it.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [I have a doozy…..](https://wordpress.org/support/topic/i-have-a-doozy/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/i-have-a-doozy/#post-3148148)
 * Perhaps it would help if you try to explain what it is exactly that you want 
   to accomplish?
    The way I understand it is as follows: You have a post and when
   showing that post you want to include video’s on the same page that relate to
   that post. Is that correct?
 *   Forum: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
   
   In reply to: [quite lost in installation](https://wordpress.org/support/topic/quite-lost-in-installation/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/quite-lost-in-installation/#post-3157596)
 * it is an URL. Simply open your webbrowser and goto [http://localhost](http://localhost)
   
   If this does not show anything this means that MAMP installed on another port
   which you can probably reach using [http://localhost:8888](http://localhost:8888)(
   this is also an URL)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [I have a doozy…..](https://wordpress.org/support/topic/i-have-a-doozy/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/i-have-a-doozy/#post-3148145)
 * oh, sorry I missed the part about this code being in single.php. That clears 
   up something.
    I don’t think there is a “current page” on a single page (the 
   name says it all) because a single page is just that, single (please correct 
   me if I am wrong). So in order to create a WP_Query on that page showing multiple(
   I am assuming related to the current page) video’s in pages (it is probably better
   to speak of “sets” in this case) you probably need to “manually” keep track of
   the current “set”. Or use the ‘offset’ key [http://codex.wordpress.org/Class_Reference/WP_Query#Offset_Parameter](http://codex.wordpress.org/Class_Reference/WP_Query#Offset_Parameter)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Redirect Loop and Cannot Login after removing "www" from site](https://wordpress.org/support/topic/redirect-loop-and-cannot-login-after-removing-www-from-site/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/redirect-loop-and-cannot-login-after-removing-www-from-site/#post-3163724)
 * Try removing your .htaccess file via FTP and see if that allows you to login 
   again.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [creating two versions of the same site, only one live at a time](https://wordpress.org/support/topic/creating-two-versions-of-the-same-site-only-one-live-at-a-time/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/creating-two-versions-of-the-same-site-only-one-live-at-a-time/#post-3164535)
 * It is more common to develop a website locally on your computer using something
   like XAMP or WAMP or LAMP (google it).
    However, you could do it remotely I guess.
   But even then would it not be better to simple create a theme and copy that to
   your existing site and then simply change the theme instead of redirecting your
   site to a new location? I am guessing you want the second site to connect to 
   the same database? That is (for the most part) not possible since the database
   holds, among other things) the URL to you site, so it cannot point to two different
   sites unless you do a multi-site install which is way too complex for your needs.
   So basically I would either install wordpress locally or remotely with a fresh
   database, import pages and posts from the old site if you want to (not needed)
   and then just create a new theme which you can then upload to your live site,
   without anyone being the wiser.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [I have a doozy…..](https://wordpress.org/support/topic/i-have-a-doozy/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/i-have-a-doozy/#post-3148143)
 * Hmm, I am not sure what the context is in which you try to do this, but if I 
   remember correctly you can display the current page of a pages set like so:
 *     ```
       $query = new WP_Query(
         array(
           'paged' => get_query_var('paged'),
           'post_type' => 'video',
           'order_by' => 'date',
           'order' => 'DESC',
           'cat' => $cat_ID,
           'posts_per_page' => 18
       )
       ```
   
 * No need to use a custom function to get the current pagenumber.
    Also, where 
   does $cat_ID come from? I am however suspecting that your problem resides elsewhere
   in your code.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Formatting nested tables in HTML](https://wordpress.org/support/topic/formatting-nested-tables-in-html/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/formatting-nested-tables-in-html/#post-3164432)
 * First of all, I am startled to see there are still table-based layouts being 
   used. But who am I to lecture.
    I am not sure what part of the spacing want to
   change? Is it the spacing between things like “Your name” and the input box? 
   If so you need the following CSS: #frmQuote p { margin: 0; } Edit: I agree with
   WPyogi
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [404 error when trying to login](https://wordpress.org/support/topic/404-error-when-trying-to-login/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/404-error-when-trying-to-login/#post-3164428)
 * Try removing your htaccess file. (you will have to reset your rewrites after 
   that under options). If that does not work try deactivating your plugins by removing
   or renaming them via FTP.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Resetting URL in General Settings](https://wordpress.org/support/topic/resetting-url-in-general-settings/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/resetting-url-in-general-settings/#post-3164426)
 * There are several solutions to this, to name but two:
 * 1) Go to the database via phpMyAdmin and go to the table xx_options (where xxx
   is your prefix). Find the entries for ‘siteurl’ and ‘home’ and change them back
   to .dev
 * 2) Open your wp-config file and add the following two lines:
    define(‘WP_SITEURL’,‘
   [http://xxxxx.dev/&#8217](http://xxxxx.dev/&#8217);); define(‘WP_HOME’, ‘[http://xxxxxx.dev/&#8217](http://xxxxxx.dev/&#8217););
 * Either one should work, but if one does not try the other.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [how to display post content for special Role?](https://wordpress.org/support/topic/how-to-display-post-content-for-special-role/)
 *  [Adam](https://wordpress.org/support/users/umbercode/)
 * (@umbercode)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-to-display-post-content-for-special-role/#post-3164323)
 * Assuming that you added roles using [add_role](http://codex.wordpress.org/Function_Reference/add_role)
   you can then assign capabilities to these roles using [add_cap](http://codex.wordpress.org/Function_Reference/add_cap)
   
   Next it is just a simple conditional to test for these capabilities in your loop
   using [current_user_can](http://codex.wordpress.org/Function_Reference/current_user_can)

Viewing 15 replies - 31 through 45 (of 63 total)

[←](https://wordpress.org/support/users/umbercode/replies/page/2/?output_format=md)
[1](https://wordpress.org/support/users/umbercode/replies/?output_format=md) [2](https://wordpress.org/support/users/umbercode/replies/page/2/?output_format=md)
3 [4](https://wordpress.org/support/users/umbercode/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/umbercode/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/umbercode/replies/page/4/?output_format=md)