Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
huhu
Feb 24, 2006
I've got WordPress running on a WAMP server on my computer. I'm playing around with Twenty Fourteen, and have it set as my site's theme. I had an issue with a static page's width and so I followed the advise here made the change in the file located at "C:\wamp\www\wordpress-trunk\wp-content\themes\twentyfourteen\style.css" and save. I refresh the static page I'm working on and nothing changes. I shut down the server and start it again, still nothing. I've also messed around with several other CSS properties for random things on the page and throughout the website but nothing is changing. What am I missing here?

Adbot
ADBOT LOVES YOU

huhu
Feb 24, 2006

down with slavery posted:

Make sure you're holding shift when you refresh to clear the browser's cache
So that works, thanks. Does that mean that a person viewing a website wouldn't see changes made to the CSS unless they clear their browser's cache?

huhu
Feb 24, 2006
Awesome thanks for the replies.

Another question, what is a good article to read about the best plugins/tools/etc to get going to secure your WordPress? I don't want to grab the first result off Google and I've looked around the Codex but it's a big more exhaustive than I'd like.

huhu
Feb 24, 2006
Thanks again.

New question, I've created a template for how I'd like my posts to appear in HTML. There are several different fields in the template including "date", "source", "highlights", "description". I'd like to be able to, when I create a new post see a form where I can input each of these items and have them show up correctly in the HTML template. Is this possible with WordPress? Just a point in the right direction would be great.

huhu
Feb 24, 2006

v1nce posted:

Here's a giant article which covers just about everything you can do: Wordpress Security: The Ultimate Guide
You probably want to start with:
  • Limit login attempts
  • Strengthen htaccess rules
  • Disable error reporting
  • Hide the wordpress version
  • Hide the login (move admin to a new location)
Then tackle whatever.

Pretty sure you can do this with the free edition of Advanced Custom Fields. Install it, go to the field management bit, and set up some fields that you attach to the Post type.
Then you can display the data using the get_field() function as outlines on their homepage.
Got some follow up questions about the forms/post templates.

This is the template I'd like to make: http://www.travisbumgarner.com.php54-4.ord1-1.websitetestlink.com/93/
This is the progress so far: http://www.travisbumgarner.com.php54-4.ord1-1.websitetestlink.com/programming/

Issue with that is I'd like the content before the horizontal line break just under "May 24, 2015 Coding Blog, Website updates". Also, the CSS isn't loading correctly (can be seen in the first example loading correctly.

Also, I've also used a custom page template and this is what it looks like (still have to clean up the CSS off of this post):
code:
<?php
/*
Single Post Template: Code Examples
Description: This page provides a template for coding examples.
*/
?>


<?php
/**
 * The template for displaying all single posts
 *
 * @package WordPress
 * @subpackage Twenty_Thirteen
 * @since Twenty Thirteen 1.0
 */

get_header();?>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<style>

</style>
	<div id="primary" class="content-area">
	<div id="content" class="site-content" role="main">
		 <?php get_template_part( 'content', get_post_format() ); ?>
		 <div class="container">
			<div class="row code-post">
			<div class="col-xs-12">
				<h3><span style="color: #bd0000;">Highlights: </span></h3>
				<?php the_field('code_highlights'); ?>
				<h3><span style="color: #bd0000;">Language: </span><?php the_field('code_language'); ?></h3>
				<h3><span style="color: #bd0000;">Source:</span> <?php the_field('code_source'); ?></h3>
				<h3><span style="color: #bd0000;">Problem Statement:</span></h3>
				<?php the_field('code_problem_statement'); ?>
				<h3><span style="color: #bd0000;">Problem Solution:</span></h3>
				<?php the_field('code_solution'); ?>
			</div>
			</div>
		</div>
		<?php /* The loop */ ?>
		<?php while ( have_posts() ) : the_post(); ?>
			<?php twentythirteen_post_nav(); ?>
			<?php comments_template(); ?>

		<?php endwhile; ?>
	</div><!-- #content -->
	</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
Another thing, this is my posts page: http://www.travisbumgarner.com.php54-4.ord1-1.websitetestlink.com/category/coding-blog/
The content isn't getting loaded in.

Apologies, I know nothing of PHP yet and not quite ready to delve into it.

Edit: Was thinking a potential solution, since I'm also having issues with the shortcode for the coding syntax markup, that I could put the code in the default content field and then move that in the php file to where the header "Solution: " is. ...if that makes any sense.

huhu fucked around with this message at 22:05 on May 25, 2015

huhu
Feb 24, 2006
Any thoughts: I'd like to split my website in half with an engineering portfolio part and a photography portfolio part. What would be the best way to do this? Could I run both parts separately from one WordPress installation? Should I add a second installation to my website?

huhu
Feb 24, 2006
I've just started helping an NGO with their current WordPress website. My first thought was to backup everything so that if I mess anything up I can recover and also to have a locally hosted copy that I could mess around with first before uploading changes. Is there anything else I should definitely focus on doing? Otherwise, I was going to start working on getting the plugins/news/etc updated and then start working on improving the theme (which they asked me to work on).

huhu
Feb 24, 2006
What could be causing images to randomly load or appear as broken? My guess is because the NGO I'm working with has opted for cheap GoDaddy hosting?

huhu
Feb 24, 2006
Really basic question but trying to read WordPress's Wiki articles for an answer is confusing... if I install WordPress in a directory, say /website, if I download the entire directory, have I completely backed up my website?

huhu
Feb 24, 2006

Weird Uncle Dave posted:

No, because that directory won't have the database. You'll have to back it up separately. The combination of those two should be sufficient, though.

Alright, one step closer. Would this plugin do the trick? https://wordpress.org/plugins/wp-db-backup/

huhu
Feb 24, 2006
I'm trying to setup a new child theme and have a style.css and functions.php. I activated the theme and it successfully points to the parent theme and loads it but I cannot figure out why any custom css is not being applied. Thoughts?

style.css
code:
/*
 Theme Name:   tesla Child
 Theme URI:    [url]http://teslathemes.com/wp-themes/tesla/[/url]
 Description:  tesla child theme
 Author:       huhu
 Author URI:   [url]http://teslathemes.com/[/url]
 Template:     tesla
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  [url]http://www.gnu.org/licenses/gpl-2.0.html[/url]
 Tags:         none
 Text Domain:  tesla-child
*/
div{
	border: 1px solid red;
}
functions.php
code:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'tesla', get_template_directory_uri() . 'style.css' );

}
?>

huhu
Feb 24, 2006
I'm using advanced custom fields and trying to add some fields to my theme using this: https://www.advancedcustomfields.com/resources/code-examples/

I created a field called "pagelink" and then went to the content.php and added <p><?php the_field('pagelink'); ?></p>. I created a new post and went down to the pagelink field, typed in "test" and created the post. Nothing showed up, what am I missing here?

Edit: If this helps...

code:
<p><!--?php the_field('testtest123'); ?--></p> == $0
Is what shows up when I inspect the code.

huhu fucked around with this message at 23:38 on May 6, 2016

huhu
Feb 24, 2006
My WordPress installation lives at huhu.com/portfolio provided by Hosting A. I'm changing the domain to portfolio.huhu.com and moving that to Hosting B. What would be the least headache inducing way to do this? Am I going to completely hate myself? My website currently consists of about 20 posts, 15 pages with each having about ~30 images. Would I end up with less headaches if I did bits of moving manually instead of trying to copy the entire site over?

huhu
Feb 24, 2006

fuf posted:

Not totally sure what you're asking here. Are you saying you need to merge three WP installs into a fourth one? Do you mean just importing posts and pages, or are you trying to nest WP installs within a subfolder of another WP install? If it's the latter then that sounds like a really bad idea. Or when you say "folder" do you just mean URL structure? It's not possible to have multiple themes active at the same time on the same install (well there's probably some hacky way that someone has come up with but it's not standard).

If it's just URLs that matter then you could have multiple WP installs running separately from one another on the server and then use URL rewrites to direct domain.com/blog to a particular installation. You'd just have to make sure that WP's own rewrites for the domain.com installation don't take over first.


Using the "Duplicator" plugin (https://en-gb.wordpress.org/plugins/duplicator/):
Install plugin on Hosting A
Create site package (something.zip and an installer.php file)
Upload both to portfolio.huhu.com on Hosting B
Navigate to portfolio.huhu.com/installer.php

You can also do it manually - the only real headache with migrating WP sites is the URLs in the DB (and sometimes in badly designed theme files). If you're doing it manually just make sure you don't just do a normal search and replace on the URLs in the DB because they are stored in serialized arrays and you'll break everything. Use something like wp-cli or https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

:worship:

huhu
Feb 24, 2006
I just found a new theme that for the first time I could customize 99% of what I wanted to do from Appearance -> Customize. However, I just copied the theme directory from my dev environment to the live website and none of the changes have been carried over. I thought that everything related to a theme was stored in WP-Content -> Themes -> ThemeFolder. What am I missing?

Edit: :sigh: They're stored in the database.
http://wordpress.stackexchange.com/questions/186357/changes-in-my-child-theme-from-customizer-not-appearing-in-style-css

huhu fucked around with this message at 18:36 on Nov 11, 2016

huhu
Feb 24, 2006
Meant to PM.

huhu fucked around with this message at 23:56 on Mar 2, 2017

huhu
Feb 24, 2006
I'd develop somewhere the client can't see it unless you want them to see it. I had a client nitpick a ton of crap that wasn't at the time presentable yet.

As for moving the site between locations, I've found the Duplicator plugin to be great.

huhu
Feb 24, 2006

devilmonk posted:

I don't know css, but someone gave me this bit of code to change the main content area of a page from its default white to a different color:

#post-1139 {
background: #f9f9ed !important;
color: #000 !important;
}

That works to change the background of the Homepage (which I assume is post-1139) here: https://www.cifas.us
What I would like to do is have all pages have that background color for the main content, but I'm not sure what to replace "post-1139" with to make that happen. Help?
code:
article[id^=post-] {
    background-color: green !important;
}
Should work. It'll set every article that has an id starting with "post-" to green.

huhu
Feb 24, 2006

dexter6 posted:

My new Wordpress site is about to go live and I want it to be as fast as possible, since it seems like WP is inherently slow sometimes.

Are their goon-owned, or at least goon-recommended, WP hosts?

Do you know anything about hosting? Do you care to learn anything about hosting? Do you plan to have just one WordPress site and nothing else on your hosting?

huhu
Feb 24, 2006

dexter6 posted:

Site will be pretty static. It'll be mostly pages that change once a year combined with a new blog post monthly.

As far as how much do I care to learn about web hosting - nothing.

I'd say just see whatever hosting has an automatic WordPress setup. I'd check out WordPress.org and see what they recommend these days.

huhu
Feb 24, 2006
I used to host my portfolio on WordPress but have since moved it elsewhere. I'd like to keep the old site up to look back on but I fear this would leave my hosting open to vulnerabilities. Is there an easy way to lock down a site or is that not possible?

huhu
Feb 24, 2006

smiling giraffe posted:

The natural history society in my local area has a Wordpress website, that includes a plugin to submit data on animal sightings using a form. As part of a personal project, I plan to create a Android app that will also allow users to submit data on animal sightings. In order to do this, I've written a Wordpress plugin that extends the REST api to allow POST requests on the table that records the sightings.

So my question is, what if any, security measures are appropriate for my REST api? Anyone will be able to use the app, but it seems like a good idea to restrict the use of the api to my app. I was looking at something like this: https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/, but I'm wondering if its overkill for a project that will in all likelyhood only be used by tens of people.

🤔 That seems like overkill. Is there authentication on the site you're sending content to? I'd probably just rate limit requests.

Adbot
ADBOT LOVES YOU

huhu
Feb 24, 2006
I am several years removed from WordPress development and do software development fulltime. I'm used to doing my own sites with SQLite for database access and GitHub for versioning. What's the best way to do local development and then push those changes up? Are there hosts that are particularly good at this? I am trying out Bluehost but I do most of my hosting on GCP so maybe there?

Edit: It looks like I can export the content. Then for actual code changes, I'll just use github in the wp folder?

huhu fucked around with this message at 03:46 on Dec 26, 2020

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply