nearlythere
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: “Big” events calendar (main page, not sidebar)bradley/likoma: i’m so impressed, great calendar. are you using event calendar 3 yet?
i’m confused… how did you get subcategories? you only added the number of the category to the call for the function, but you didn’t have to edit the function?
i don’t understand… this is really difficult!
would you pastebin your code for how the index-12.php file is? or even your event calendar plugin code that you modified?
https://pastebin.com/thank you!
Forum: Installing WordPress
In reply to: My second loop doesn’t worksorry, ganzua i don’t understand then. you said your “second loop doesn’t work”
still looks to me like an open HTML comment!
this is what i see: i see two loops, preceded by two queries:
first:
<?php query_posts('posts_per_page=1'); ?>
second:
<?php
query_posts('page_id=3');
?>and the second one is ‘hidden’ inside an unclosed HTML comment tag. and if i look at the HTML source, the code was still ‘run’ but it isn’t appearing, because it is hidden in HTMl comment.
<!-- Index inicio
Page template<div class="post" id="post-3">
<h2>Inicio</h2>
<div class="entrytext">
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</div>
</div>
<!-- Index inicio
Page template -->
so after the first:
<!-- Index inicio
Page templateyou need to close the comment. and it should look like this:
<!-- Index inicio
Page template -->i don’t mind where you do it, but you have to close it somewhere. that’s about as clear as i can make it.
if this isn’t the solution to your problem, sorry i can’t help further!
Forum: Plugins
In reply to: help assembling an SQL statement in a pluginignore this…
nevermind i got it, and it doesn’t work anyway!
$content = preg_replace("/AND post_date_gmt <= '(d{4})-(d{2})-(d{2}) (d{2}):(d{2}):(d{2})'/", "AND post_date_gmt <= '".$nearfuture."' AND ".$wpdb->post2cat."category_id in (1,2,23)", $content);
Forum: Plugins
In reply to: EventCalendar 3.0 Question – Draftsjpdhnc, i noticed the category changed to 6, so those links above are dead. and your site looks ok now, is it? i could not understand your question, since you say it is for a category archive (i’m assuming for the events category) but it is doing checks for date archives.
at any rate… i see this is your first post- but you might have gotten a response more quickly had you started a new thread, with a meaningful keyworded subject heading. you might note that above your post, alex had ‘resolved’ the original poster’s question, so yours would be lost or off-topic.
so- if you figured out how to fix your problem, please come back and tell us! best of luck!
Forum: Installing WordPress
In reply to: My second loop doesn’t worki quickly scanned that file, and noted that you have two comments in your file, but one is not closed. look for the comment which does not close:
<!-- Index inicio
Page template
you need to close this with:
-->
i also noted that on your page i see a stray end of comment line here:
Archivos
* Octubre 2005
-->
i’m not entirely sure if this will solve your problem, but can you fix that comment by closing it
-->
and run the code and come back to tell us how it came along?Forum: Fixing WordPress
In reply to: Contact Form Plugin Questioni came across another plugin, built off the original contact form, this one has an “optional redirect” which you might find helpful:
https://www.phrixus.co.uk/pxsmail/
if it works, please come back and tell us.
Forum: Fixing WordPress
In reply to: Contact Form Plugin QuestionAt first I though, it’s not so bad to get the message twice, and as a user, i don’t think i’d notice it.
But maybe you don’t want to redirect to that page, you want to redirect to the page from which they came?
Is that what you want?
Or do you want it only to appear in sidebar, not in full page?
Forum: Fixing WordPress
In reply to: Current AuthorYou will be happy to find
the_author
Template Tag in the handy Codex!https://codex.www.ads-software.com/Template_Tags/the_author
This will require you to edit your template files, probably for the first time, I guess? It’s not too hard.
Open the file located in your directory: wp-content/themes/default/index.php
Search for:
<!-- by <?php the_author() ?> -->
Lucky you they already but the author link in the template, but used HTML comments so it doesn’t appear. So remove the commenting so you only have:
by <?php the_author() ?>
Now test it! It should work. Now you can try moving it around to another place like after your post.
If you go to the main Template Tags page, you can see a whole list of things you can add about your author on each post.
https://codex.www.ads-software.com/Template_TagsForum: Plugins
In reply to: Having the Wp-login.php in the top level of the siteHello, and welcome to wordpress.
i saw your post, and found some leads to answers by searching. i typed in “require login” and different combinations with “view posts”
https://www.ads-software.com/support/topic/45553
https://www.ads-software.com/support/topic/39516finally, it looks like there are two useful ‘plugins’ to make this happen.
https://carthik.net/blog/vault/2005/05/12/registered-only-plugin-reworked/
https://17thdegree.com/archives/2005/07/01/wordpress-plugin-page-restriction/to choose which is best, you can install both; or even start in the support forum search- and look for people writing about the plugin.
FYI: Plugins add functionality to WordPress, and are developed mainly by volunteers. You usually need to maake small modifications, then upload them to your site, then activated in the admin > plugin manager.
https://codex.www.ads-software.com/PluginsBest of luck! … and as you learn more, please return to the forums and help others when you can. ??
Forum: Installing WordPress
In reply to: My second loop doesn’t workganzua, i’m trying help expand the codex page for query_posts; this would be a good thing to add if you figure out a solution. (you can edit the codex too, if you like).
but i can’t read your code, so i can’t figure out how to help. do you know how to insert code into your posts? you need to use ‘backticks’ around each line. (see the message under the “send post” button below)…
at any rate, the thing you’re searching for is referred to as “multiple loops”, this may help in your searching.
I don’t really understand the inner workings of the issue, but I keep coming across it, there are recommendations to “Try resetting the query to the default after using your custom queries.”
I saw this on the codex:
<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name=special_cat&showposts=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Do special_cat stuff... -->
<?php endwhile; ?>
<?php $wp_query = $temp_query; ?>
try that for each of your query loops, and tell us how it comes along!
Forum: Plugins
In reply to: How do I display the last 10 posts ?that original post is for an older version of WP. one funny thing about the forum is that you can dig up old posts with outdated versions of WP. it’s happened to me too ??
at any rate, i’m not sure, are you trying to list the last 10 comments or the last 10 posts? (that is what anti-fuse’s code would have done)
just to make sure you’re looking at the right wiki, and using the right plugins for WP 1.5.x , please see:
Forum: Fixing WordPress
In reply to: Twice re-ordering categorieshow about trying query_posts, which resets the values for the queries or re-sets the query string that each loop runs, for each loop on the page (honestly, i can’t describe the inner workings, but this should work):
<?php query_posts('cat=5&showposts=8'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
then,
<?php query_posts('cat=-1&orderby=title&showposts=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
Note query_posts only only excludes one category at a time, but you can use workarounds
See more:
* https://infovore.org/archives/2005/04/12/multiple-loops/
* https://codex.www.ads-software.com/Template_Tags/query_postsForum: Themes and Templates
In reply to: Display by Category home.php templatebawk, i’m not sure how you want the posts displayed, but a handy way to adapt the code to a new layout:
run through the code, and replace any queries inside
<? ?>
with dummy text:<h2 style="text-align: center; background-color: #48b; margin: 0 -20px 0 -20px;" id="dummy"><a style="color: #fff;" href="dummylink" title="View all posts in dummy">dummy category</a></h2>
so you can see it’s only a header 2 tag.
now, make the layout you do want to use, for example, have them all appear in on one line together, separated by |
<a href="dummylink" title="View all posts in dummy">dummy category</a> |
and replace the dummy text with the code you need:
<a href="<?php echo get_category_link($current_cat); ?>" title="View all posts in <?php echo get_the_category_by_id($current_cat); ?>"><?php echo get_the_category_by_id($current_cat); ?></a> |
if you want more complex CSS horizontal layouts for lists, see:
https://www.alistapart.com/articles/taminglists/Forum: Fixing WordPress
In reply to: query_posts in subcategory (future years)i have done more tests, and can conclude:
i was only getting a display of future posts because i had activated the eventcalendar plugin. but it affects other categories, and if you use the code above (with top-level categories only).
Forum: Fixing WordPress
In reply to: URL: /?tegory%/%postname%/Not as far as I know, I have never been able to get it to work. I just accepted that my URL structure was not going to make too much sense.
so for permalink structure, i just did /%postname%/ and for category base i put in ‘portfolio’. not ideal, but at least my sub category pages work.