muhammadwaqas
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: want to create wordpress gallery link ending with hashtagAaron Nimocks
Thanks for the tip. I tried but it didn’t work. No errors and no effect to urls.
Forum: Fixing WordPress
In reply to: want to create wordpress gallery link ending with hashtagsorry I didn’t explained clearly. I want to change slug.
https://sitename.com/post-name/attachement-name-2/
to
https://sitename.com/post-name/attachement-name-2/#image
Forum: Plugins
In reply to: [SEO SearchTerms Tagging 2] WP 3.5 : Missing argument 2 for wpdb::prepareIm getting the same errors, it seems this plugins don’t support the very recent update of wordpress.
Im gonna try the solution mentioned by terry.g
Edit: just noticed that author at his blog says
So starting today, I highly recommend and urge all my friends to no longer use auto-tagging and a link to the search page SEO plugin searchterms Tagging 2.
link: https://exclusivewp.com/2011/google-panda-dan-seo-searchterms-tagging-2.html
Forum: Fixing WordPress
In reply to: Error: plugin.php on line 403I was because of an incomplete function in theme file function.php
what actually happened? I added a function and later removed that but not complete. the following part was left unremoved
add_action('admin_footer', 'dpbc');
so I you also watching the similar errors on your admin footer. try finding incomplete function.
Forum: Themes and Templates
In reply to: Mobile version at subdomain?responsive design can be made only when you having minimal design.
Its better to make a light version for mobile with small images, no js, no unused css.
Forum: Fixing WordPress
In reply to: Can't retrieve custom field data with next post linkyeah, thanks
Forum: Fixing WordPress
In reply to: Can't retrieve custom field data with next post linkthis code is working. I just remove the “next” from post id.
alchymyth code seems correct too but it doesn’t work that way. But I’ve got the idea that I was wrong about $nextPost->ID
echo ‘<img src=”‘.get_post_meta($post->ID,’label_value’,ture).'”/>’;
Thanks all.
Forum: Fixing WordPress
In reply to: Can't retrieve custom field data with next post linkI tried this, but no result
echo '<img width="200" src="'.get_post_meta($nextPost->ID,'label_value',ture).'_250.jpg"/>';
Forum: Hacks
In reply to: How to bypass empty title/content check on publish?I tried by removing that snippet from wordpress core file.
it worked but after publishing I wasn’t able to delete posts
I think I’d go with titles as wordpress don’t support it officially. thats why I say its not cms. ??
Forum: Fixing WordPress
In reply to: Excluding multiple categories using $exclude[] treejust solved my problem without any help, the full working code is
<?php $category = get_the_category(); ?> <?php $exclude = get_option( 'sticky_posts' ); $exclude[] = $category[0]->cat_ID; $loop = new WP_Query( array( 'category__not_in' => $exclude, 'cat'=> -36, ) ); $m = 0; while ( $loop->have_posts() ) : $loop->the_post(); $m++; ?> my content goes here <?php endwhile; ?> <?php wp_reset_query(); ?>
Forum: Fixing WordPress
In reply to: how to get custom number of posts per page in specific tag archivethanks vtxyzzy
above I’ve posted a solution to get custom number of posts from a tag or category. that will only print the posts. pagination will not work with that code.
but if any wants to use pagination too, here is the complete solution. you can use it for both tags and categories
<?php query_posts( array( 'posts_per_page' => 15, 'tag' => 'cars', 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), )); ?>
to use it for categories just replace the 3rd line with whatever you want; eg
'cat' => '10',
Forum: Fixing WordPress
In reply to: how to get custom number of posts per page in specific tag archiveok,
here is the solution I’ve tried.
<?php global $query_string; query_posts( 'tag=car' . '&posts_per_page=15' ); ?>
to use multiple tags use:
query_posts( 'tag=cars+bikes' . '&posts_per_page=15' );
or combine any category with tags:
query_posts( 'cat=1&tag=cars+bikes' . '&posts_per_page=15' );
or just use categories:
query_posts( 'cat=1' . '&posts_per_page=15' );
now jump high ??
Forum: Fixing WordPress
In reply to: how to get custom number of posts per page in specific tag archivethis time its not creating the error but still it is using global post per page option.
I’ve tried it, it changes the number of posts per page but it includes all recent posts
<?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
query_posts(‘posts_per_page=5&paged=’ . $paged ); ?>Forum: Fixing WordPress
In reply to: how to get custom number of posts per page in specific tag archivenot working, it shows “server error” page
Forum: Fixing WordPress
In reply to: Check if post has galleryI’m using this one since an year
<?php if (strpos($post->post_content,'[gallery') !== false){ echo do_shortcode('[gallery]'); } else { the_post_thumbnail(); } ?>