bobdobbs
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How do I get CPT's to show in the admin bar?Yeah, that missing ‘a’ is just a copy/paste error.
In my actual code I have the ‘a’.
Forum: Fixing WordPress
In reply to: How do I get CPT's to show in the admin bar?Hi Drew.
I have set public to true, as per the tutorial, but I’m still not seeing anything new in the admin bar.
This is my function so far: https://pastebin.com/dREGva7J
Well, it’s obvious that some features of the plugin won’t be able to work on a localhost url. But as far as I can tell, a localhost setup shouldn’t automatically generate a permissions error.
So, does anyone know what the correct permissions are for the plugin directory?
Forum: Plugins
In reply to: [Yoast SEO] [Plugin: WordPress SEO by Yoast] delete meta descriptionStefan’s fix worked for me.
In the dashboard for the plugin, I clicked on ‘save settings’ and the warning vanished.
Forum: Fixing WordPress
In reply to: Posts show "Related Link" – NOT wanteditspamm:
Try disabling your plugins one-by-one and watching for changes.
Also, check the functions.php file. There might be something in there.
esmi: I don’t think that this issue is related to the theme file. I think that this might be the result of a malicious plugin or malicious code.
Other posts across the internet are complaining of this exact same problem, but nobody has posted a solution yet.
Bump
bump
Forum: Fixing WordPress
In reply to: In loop, do something with newest four postsYes!
That does it.Thanks very much.
To add a complication, the blog has a number of categories, and I only want the condition to return true if the post being presented is of a certain category.
I think I’ve nailed this by adding a parameter to the getposts call, thus:
$last_four = get_posts('numberposts=4', 'category=4')
My initial tests seem to show this as succesful.
Again, thanks for helping me get this result. Much appreciated ??
Forum: Fixing WordPress
In reply to: In loop, do something with newest four postsThis is the current state of the code:
https://pastebin.com/rzUA1bpcI’m afraid it’s a little complicated. But in essence it does this: it grabs all posts of a certain category. If the post has an attachment, it publishes the post.
I’m afraid a counter won’t help.
Using a counter, I can do something special to x number of post that I publish. But, I specifically want to do something special with the newest 4 posts, no matter what criteria I use to sort them by.So, I might want to publish posts sorted, say, author. But I’d still like to apply a particular css class to whichever posts, regardless of authorship, that where published most recently.
Forum: Fixing WordPress
In reply to: In loop, do something with newest four postsHi alchymyth.
Whatever that does, it must be close.
This is how I’m expressing the condtion:if ( $wp_query->current_post <=3 && !is_paged()) { echo "<li class=\"sister-post newpost \">" ; }else{ echo "<li class=\"sister-post\">" ;
The results get paged across two pages. 8 results show on the first page. Using the code you’ve given me, every one of the first 8 results is given the class ‘newpost’.
Maybe I’m doing something wrong, but the condition proves true for every one of the first 8 results.
Could you break it down a little for me?
What is this idiom?<=3
Forum: Fixing WordPress
In reply to: search form returns no resultsI’m still working on this, and have no solution yet.
Is this a known problem?
Is there a trouble shooting process to follow when the search returns no results?
Forum: Fixing WordPress
In reply to: WP_Query and pagination. How to do it?Got it!
User Rusito on #wordpress pointed me to this blog post:
Not sure why it worked, but it did.
The main difference between what I’ve been trying, and the code on this blog, is the use of the ‘query’ paramater being passed to the call to wp_navi.Forum: Fixing WordPress
In reply to: WP_Query and pagination. How to do it?Using query_posts() isn’t an option:
I’ll be using multiple loops in the page, so I need to instantiate my own WP_Query.Forum: Fixing WordPress
In reply to: search form returns no resultsNo I hadn’t.
Thanks for pointing me towards it.So, if I gather correct, pagination for posts won’t work at all, when the posts are being called from a page, unless a plugin is used?
Forum: Fixing WordPress
In reply to: search form returns no resultsHi.
I’m back from a brief holiday, and back into figuring out this problem.Here is a link to the site I’m working on:
74.52.51.90/gallery