I am after adding dynamically the <--nextpage--> tag only on mobile, to posts.
It appears that hooking to the_content is too late, as nextpage is being decided on "the_post()" phase.
I found some code that would do that on "the_content", but, at the_post phase, $content is not available for manipulation.
I would really appreciate if you could write the relevant php code to hook/filter the right phase and be able to dynamically insert the <--nextpage--> on posts that are viewed on mobile.
I'm using wordpress + thesis2, editing custom.php for hooks/filters/functions.
Thank you in advance,
Ronen.
Here's the answer:
http://www.byobwebsite.com/forum/general-thesis-questions/how-to-continue-reading-in-a-post-on-mobile-only/#p24251
You'll find in the above link the code to use.
R.
Related
I am very new to wordpress. But have good knowledge in php, html, css and javascript.
I want to add custom font-resizer to my wordpress site. as shown below for example.
What would be the best and non-messy way to add the plugin code to my website.
I have looked at some tutorials online but it seems that I can't getting those.
Any help would be appreciated. thank you..
If you're trying to add that plugin specifically to your site, then its documentation suggests:
adding it through a widget that the plugin creates
or using this bit of code wherever you want in whichever template file: <?php if(function_exists('fontResizer_place')) { fontResizer_place(); } ?>
Does your theme have a place for widgets in its header? If not, you'll want to just place that bit of PHP somewhere in your header.php file.
I have an existing single website (index.html) that works with a jquery content slider and I want to add my wordpress blog in one of the tabs. The blog is installed in mysite.com/blog/.
I saw a tutorial on how to show posts with php, but then when clicking those, it sends people off my page to the blog.
If I use iframe then I have SEO problems (or do I?) and the blog seems to be moving up when entering a comment on a post.
I hope somebody can help!
Sincerely, Brian
You probably need something like this
Demo is here
My first question here! I want to override the disqus "1 Comentario y 0 Reacciones" from the left part of the theme to just the comment count. It shoud look like the image attached.
I have searched the database for a similar problem but no luck.
Here is my blog in the test server if you want to check out.
I have tried to put this code in the functions.php of my theme so the Disqus doesn't override the comments from the theme.
// Disqus: Prevent from replacing comment count
remove_filter('comments_number', 'dsq_comments_text');
remove_filter('get_comments_number', 'dsq_comments_number');
remove_action('loop_end', 'dsq_loop_end');
Also the output Javascript option in the Advanced options of the Disqus plugin, But no luck with that. Hope someone help me (I will owe you a beer!)
Update: Apparently the problem happens in the home, category, search pages but not in the single post.
Ok after looking #dInGd0nG post link I found the simple solution to this problem. Just go to functions.php of your wordpress theme and insert this snippet:
// Disqus: Prevent from replacing comment count
remove_filter('comments_number', 'dsq_comments_text');
remove_filter('get_comments_number', 'dsq_comments_number');
remove_action('loop_end', 'dsq_loop_end');
That's all. And it's better than going to the Advanced tab from the Disqus plugin and outputting the Javascript in the footer, since that would make it slower.
I want to write a plugin that will pull a sidebar from one Wordpress blog and place it in the sidebar of another blog. I know to write a plugin, but actually don't know where to start with this idea.
I believe he's saying that he wants to write a plugin to be able to retrieve a sidebar from another website and display it (possibly as a widget?). If that is not the question then I apologize; otherwise, I'll take a shot at answering.
The first thing I would recommend would be to view the code of just about any other widget plugin to make sure that a plugin (and not just some JavaScript) is really what you want.
Assuming you want the plugin, check out this resource for some basics. Also, you'll need the retrieval code which will either be "screen-scraping" in PHP or AJAX partial page loading with JavaScript.
I hope any or all of this helps you get where you're going.
I'm designing a theme for wordpress. I need advice on how I would construct it.
At the bottom of my Frontpage/Home I will put a snippets (a title and a short description of blog post) of what is new in my Blog .
Preview:
Question:
What approach should I use? I can make the bottom page widget ready and will just use widget or will use PHP to pull details in my 'blog' page (I dunno how to do it php, a link would be useful)
what is the proper approach? I'm designing it for a client. My concern is If I would make it widget ready, client would have to install the widget. If I would do it on PHP, (I have no resource and idea in doing that )
Thanks!
You'll need to know some PHP and JavaScript if you want to make a WP theme from scratch. Otherwise I would suggest to modify an existing one.
Here is the theme development help from WP.
You'll have to run a loop, in which you'll retrieve the posts from the database (Wordpress handles that) and show them as needed.
The Loop In Action and
Building Custom Wordpress Themes
Hope that helps