Max
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Mysql query to insert "EXPIRED" into titlesUnless I am miss-understanding you here – it sounds like the posts that have expired are all in the “Archived” category. Therefore, would it not be simpler to just check if the post is in the archived category in the loop – and then print the word “Expired” if it is – in the appropriate place in your template?
Sounds like the in_category() function may be what you are looking for – and some code, similar to the below?
if ( in_category( "Archived") ): echo "Expired"; endif;
Forum: Fixing WordPress
In reply to: Fresh install can't access some pages.Curious thing is that you are being redirected to the IP address of the server, rather than the domain name of the site.
curl -vko /dev/null blentico.com/wp-admin % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 74.208.236.70... * Connected to blentico.com (74.208.236.70) port 80 (#0) 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0> GET /wp-admin HTTP/1.1 > Host: blentico.com > User-Agent: curl/7.43.0 > Accept: */* > < HTTP/1.1 302 Found < Content-Type: text/html; charset=iso-8859-1 < Content-Length: 206 < Connection: keep-alive < Keep-Alive: timeout=15 < Date: Sat, 16 Jul 2016 23:47:18 GMT < Server: Apache < Location: https://149.56.125.205/ < { [206 bytes data] 100 206 100 206 0 0 654 0 --:--:-- --:--:-- --:--:-- 656 * Connection #0 to host blentico.com left intact
This is likely something in either your
wp-config.php
or your site_url that is overriding thesite_url
field.Have you tried to login by accessing https://149.56.125.205/wp-login.php and then checking to see what the site_url field is in settings?
Don’t set the header in Apache for now…
Forum: Fixing WordPress
In reply to: Fratured and embedded content image not displayingIt seems that you have enabled the “photon” extension in Jetpack. This hosts your images on the WordPress CDN. I can tell this by looking at the attachment URL in one of the missing images on your home page.
https://i2.wp.com/www.realsims.com/wp-content/uploads/2016/05/sim-center-san-francisco.jpg?w=640
This represents an image that should be at:
https://www.realsims.com/wp-content/uploads/2016/05/sim-center-san-francisco.jpg
When I look for the image in the link above, I get an error message from your site, indicating that the picture has been removed, or is no longer there.
I would suggest you turn off “Photon” and first ensure that all your images are appearing correctly on your site. If necessary, look in “Media” and ensure that the attachment URL in the post is the same as the one that the picture in Media is using.
Once everything works, you can turn “Photon” back in in Jetpack settings.
Forum: Fixing WordPress
In reply to: Uploading photos from Google Photos to Media LibraryThe short answer is – not easily, you would likely have to download them from Google Photos and re-upload them to Media Library (if you would like the media hosted in WordPress).
The long answer is that you could extend WordPress to do this – by producing a plugin that enables this functionality. Google Photo’s uses the Picasa Web Api. Google have published some developer documentation on interacting with the Picasa Web API using PHP. As with all things that involve coding, you should determine if this is right for you, and what your return on investment will be if you put in the effort, or pay for someone else to do this for you.
Forum: Plugins
In reply to: [W3 Total Cache] "Set expires header" option, in browser settings is disabledThis is likely because W3TC’s author read the CloudFront documentation. Specifically CloudFront state in their documentation:
We recommend that you use the
Cache-Control max-age
directive instead of theExpires
header field to control object caching. If you specify values both forCache-Control max-age
and forExpires
, CloudFront uses only the value ofmax-age
.Forum: Themes and Templates
In reply to: Theme Functions (functions.php) got messed upTry and change your first function and the add_filter statement to this:
function widget_title_link( $title ){ $retVal = ''; switch( $title ){ case "Facebook": $retVal = '<a href="https://www.facebook.com/HeatNation">'.$title.'</a>'; break; case "Game News": $retVal = '<a href="https://heatnation.com/category/game-news">'.$title.'</a>'; break; case "Team News": $retVal = '<a href="https://heatnation.com/category/team-news">'.$title.'</a>'; break; case "Media": $retVal = '<a href="https://heatnation.com/category/media">'.$title.'</a>'; break; case "Editorials": $retVal = '<a href="https://heatnation.com/category/editorials">'.$title.'</a>' break; case "Rumors": $retVal = '<a href="https://heatnation.com/category/rumors">'.$title.'</a>'; break; default: $retVal = '<a href="https://heatnation.com">'.$title.'</a>'; } return $retVal; } add_filter( 'widget_title', 'widget_title_link' );
It is easier to follow that the long
elseif
block, and you can extend it faster. Should also solve your problem.Next time, remember that making a backup of a file on a production system before you start tinkering with the code will save you.
Forum: Themes and Templates
In reply to: Theme Functions (functions.php) got messed upI don’t know what you are trying to do — but it looks like you have accidentally deleted part of your first function… so you an bring your site up by commenting out all the code in that function, or restoring functions.php from a backup.
function widget_title_link( $title ) { return "$title"; } add_filter( 'widget_title', 'widget_title_link' );
Something like this should restore it to at least allow it to work.
Forum: Themes and Templates
In reply to: Theme Functions (functions.php) got messed upPlease quote your code using the “code” button in the forum post window you when you post it – else no one can read this code to help you…
Forum: Installing WordPress
In reply to: Reinstalled wordpress, database error, tables maybe not filled?I think you what have there is going to be hard to fix in the way it sounds you are doing, as the database is relational, i.e., the
wp_posts
table refers to information in other tables, for example thewp_post_meta
table. Now from what I gather you did not keep thewp_post_meta
table from the old installation? If that is true, then importing just the oldwp_posts
table may not work, as the oldwp_posts
file may contain post IDs that are already in use in your new WordPress install.I would suggest you first install a completely blank new WordPress, and see that it is working before you start to introduce your saved table information, and then delete the sample post.
Then, you can try and import the old
wp_posts
table, assuming you have the .sql for that table (which I think you do from your description). This will create new entires provided there is no collision of the primary key field “ID” in the new WordPresswp_posts
table.If there is none, and the .sql file imports successfully, you will have all your posts, but no meta-data about them (such as any custom fields you may have had on your old WordPress site). Additionally, comments are generally stored in
wp_comments
so if you deleted that table as well, you will only have the comments count for each post, but no longer the actual comments.Depending how many posts you had on your old install, you may be better off just copying and pasting the old posts back into the new install, which will create all the references to other database tables correctly.
Forum: Installing WordPress
In reply to: Multiple sites with local hostingFor local installs, on my dev machine, I just double up, and install a new copy of WordPress in a new folder. I keep my local web_root in ~/Sites and map every new wordpress install to its actual domain as in:
~/SItes/example.com ~/Sites/anotherexample.com
As for the database, I create a new database inside MySQL for each site, and I have a naming convention that is basically a shortened version of the database name e.g., “exmplcom_db”.
As for installation, I configure Apache (I just use the one that came with OSX, but you can do the same with MAMP) with a new virtual-host matching the new domain and pointing to the correct folder in ~/Sites.
To point the domain at my local machine, I just edit /etc/hosts and add a new line of the form, which I uncomment when I want the DNS to point to the production host:
127.0.0.1 example.com
If you are a dab and at bash, you can script all of the above to setup a new site, and add the aliases in /etc/hosts, which makes it a cinch.
Forum: Installing WordPress
In reply to: Installation – WordPress Login wont show up@ SBS7SSD post a link to your domain pls.
@ jhonatanct you should open your own thread, even if you think this is the same problem, it likely isn’t, then you ned up hijacking the OPs thread.
Forum: Plugins
In reply to: Can't insert media from nextGen gallery into postYou should maybe take this to the NGG support forum, this is the WordPress installation forum.
Forum: Networking WordPress
In reply to: Multiple Website in One Central DatabaseIf you want to map different domains to the same install – then you should look at the Domain Mapping Plugin.
Forum: Networking WordPress
In reply to: Multiple Website in One Central DatabaseSound like you want to run WordPress in Multi-Site mode.
Forum: Fixing WordPress
In reply to: URL links do not show upCan you provide a link to your blog please…