x500.net
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Auto adding paragraphs to custom fields with 'wpautop'?<?php $myLongDescription = get_post_meta($post ->ID, 'long-desc',true); ?> <p id="long-desc"> <?php echo wpautop( $myLongDescription, false ); ?> </p>
Forum: Fixing WordPress
In reply to: Index.php appears twice in URLWhen you now go to https://nonaorbach.com/blog/index.php/page/2/ and click pagination links for page 2 and up you’ll notice that there is no more problem with additional index.php/ added to the url.
IMHO the problem lies in pagination base not set correctly in your theme code rather than WP not reflecting changes to the permalink structure.
Forum: Fixing WordPress
In reply to: Foreign keysThis may be helpful.
Forum: Fixing WordPress
In reply to: Index.php appears twice in URLAnd what is the current permalink structure?
Can you point me to a page where you see strange looking links?Forum: Fixing WordPress
In reply to: links linking back to mysite.com/WP/ instead of real home pageHave you installed your WordPress in WP directory?
Forum: Fixing WordPress
In reply to: Cannot modify header information – headers already sent byand one more thing… paste the wp_deregister_script from your functions file as it’s hard to guess what’s there.
you’ll find it in functions.php on line 2959 and aroundForum: Fixing WordPress
In reply to: Plugin / Theme file pathfunction ScriptsAndCSS() { wp_enqueue_style($this->plugin->name.'-bootstrap', get_template_directory_uri().'/css/bootstrap.min.css'); }
Forum: Fixing WordPress
In reply to: Added more to my root permalink than neededCan you paste content of permalink structure you’re using at present?
Forum: Fixing WordPress
In reply to: Offset Archives / target all monts afterMaybe you don’t need to set the limit for the query and just hide part of the list with jQuery?
Alternatively, you can keep what you have there and run second query for archives, remove elements from the array with array_splice and append the result to<ul>
element using jQuery?Forum: Fixing WordPress
In reply to: url path with children pages of a frontpage static pageHmm, how about adding custom field to each post you want to appear on home page and run query to get posts with key/value pair?
So lets say you add custom field slider=home to each page you want added.
Then query like this:$featuredArgs = array( 'post_type' => 'page', 'meta_query' => array( array( 'key' => 'slider', 'value' => 'home', 'compare' => '=' ) ) ); $featuredQuery = new WP_Query( $featuredArgs );
And here you just loop posts returned by the query?
Forum: Fixing WordPress
In reply to: url path with children pages of a frontpage static pageThis is a default structure that WP will keep for parent/child pages.
Is there any particular reason why you assign pages as children of “homepage” page?Forum: Fixing WordPress
In reply to: Custom Field inline with page title?<div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="page-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="page-title"><?php the_title(); ?> <?php $link = get_post_meta(get_the_ID(), 'link', true); // check if the custom field has a value if($link != '') { echo $link; } ?></h2> <?php edit_post_link(__( 'Edit', 'themezee_lang' )); ?> <div class="entry"> <?php the_post_thumbnail('medium', array('class' => 'alignleft')); ?> <?php the_content(); ?> <div class="clear"></div> <?php wp_link_pages(); ?> </div> </div>
Forum: Fixing WordPress
In reply to: Custom Field inline with page title?Maybe echo its value within the same html tag where the title is?
It’s kinda hard to guess what html structure there is in your theme without even seeing a bit of code.Forum: Fixing WordPress
In reply to: Pages with different PermalinkstructureDashboard -> Settings -> Permalinks -> select Custom Structure
use this: /blog/%category%/%postname%
Click Save ChangesPages will not be affected.
Forum: Fixing WordPress
In reply to: Printng text of a post but remove some wordssomething like this??
query_posts('cat=10&name=Elvis&posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post(); echo '<div class="title">' ; the_title(); echo '<br/>'; the_post_thumbnail(apply_filters('excerpt_thumbnail_size', 'thumbnail')); $content = get_the_content(); echo preg_replace ('/\[gallery\]/', '', $content); endwhile; endif;