I have imported over 150+ blogs from an old wordpress site onto my new wordpress side. In my old site, I used a shortcode in all the blogs that showed the five most recent blogs. However, I am using a widget to get this functionality now.
The problem is:
The shortcode text is still in all of my blog.
My question:
Is there anyway to get rid of the shortcode text in every post from my blog category. More specifically, can I remove the string '[5mostrecentblogpost]' in the post in my blog category?
Run this sql code:
UPDATE `posts` SET `text` = REPLACE(text, '[5mostrecentblogpost]', '');
where posts - is posts table name and text is content field;
Related
I have a WordPress website where I post blog for different cities and the content of all post are same
so, is there any way I can create multiple posts for multiple cities? i just have to change the title and rest everything is the same
You can use any plugin for post/page duplicator, after duplicate post/page you just need to change the title and slug.
You can use this plugin: https://wordpress.org/plugins/duplicate-page/
Or you can use which you like most.
In my wordpress page I want to add a feature which will allow me to display post in the browsing loop (e.g. by categories) only with main title and secondary title. By default wordpress engine use title and first sentences from post content.
I've installed a "Secondary Title" title plugin to add a this ability however in my post section I just get First Title:Secondary title and post content below it. How can I change it?
I recently added a functionality to allow Twitter to create blog posts automatically whenever a new tweet is posted. As I'm using Wordpress Jetpack Publicize so I wanted the title of the posts to be the full tweet, that way it'll automatically update all my social channels.
As the permalink setting I'm using %postname% for all posts but in case of Twitter posts it gets way too long and creates issues with Backup and other things.
The Twitter post is assigned to a category Tweets so I want wordpress to set custom permalink for the same category posts. How can I do that?
You can see the twitter posts at my blog - http://robo.im/blog
I'm using Wordpress Plugin Twitter Tools to fetch the new Tweets
Just set the custom premalinks to /%category%/ here you can read what to do if posts have multiple categories.
But if not change urls for all categories, use custom post type instead of category, and follow one of many tutotrials how to change permalinks for that type.
I am using the plugin display-posts http://wordpress.org/support/plugin/display-posts-shortcode
which lets me display all posts (venues) from a particular category on a page, rather than just using a category.
(This is so that I can in a higher up area of my website use the child-pages shortcode plugin to display a list of these pages (locations), as there seems to be no plugin available to display categories with a thumbnail chosen from one of its posts.)
The problem I am having is that I can set a featured image and text in the post to get pulled into this listing of posts page, but my nextgen gallery shortcode which I am using to display a selection of thumbnails for each venue within the post, is being displayed as plaintext and not activating the shortcode.
If I directly view the post on its own then the shortcode is working fine and the thumbs appear, I presume its something to do with using a shortcode within something already being generated by a shortcode?
This happens whether I am using include_excerpt="true" and manually placing the shortcode in the excerpt box as well as the main content area, or if I use include_content="true".
My shortcode in my page to pull in these posts is
[display-posts category="ayia-napa" order="ASC" orderby="title" include_excerpt="true" include_content="true"]
My shortcode for nextgen sat in individual post is
[ngg_images gallery_ids="1" display_type="photocrati-nextgen_basic_thumbnails"]
I'm not sure if the problem is specific to the plugin/code I am using or whether Wordpress has this problem in general.
I have followed advice online to include an add_filter in my functions.php file for showing shortcodes within excerpts but this doesn't seem to be working.
Thanks
Cathy
I have a website that is a custom PHP site hosted at http://mysite.com. Then I have a Wordpress instance running on sub-domain at http://blog.mysite.com, where some post can be at URL http://blog.mysite.com/this-is-my-test-post-entry
In landing page of mysite.com I connect to Wordpress DB and fetch out last 5 entries from wp_posts table and show them on my home page. The problem is I don't know how to get the right links to those posts? Wordpress generates permalinks() but I don't know how to get them?
I thought Wordpress takes post title string and replaces spaces with "-" and uses that string for post URL. But doesn't work for all posts...
Any suggestions?
This may not be exactly what you are looking for, but it will work...
When you fetch your last 5 posts, get the id (make sure you're filtering on your post_type field to avoid grabbing things like revisions, attachments, etc).
You can simply build your URL like http://blog.mysite.com/?p=ID (where ID is the ID from the database). WordPress will automatically redirect the user to the proper page with the custom permalink that you defined in your settings.
Let me know if you need a hand with the PHP.